mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-17 14:30:35 +01:00
LCL: Ignore AutoSize in ShouldAutoAdjustWidthAndHeight for TEdit and TCombobox. Helps with DPI issues. Issue #30995, patch from AlexeyT.
git-svn-id: trunk@53486 -
This commit is contained in:
parent
85e7d6da06
commit
ea8843fd24
@ -622,6 +622,11 @@ begin
|
|||||||
Result := False;
|
Result := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TCustomComboBox.ShouldAutoAdjustWidthAndHeight: Boolean;
|
||||||
|
begin
|
||||||
|
Result := (Align = alNone);
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
function TCustomComboBox.GetItemCount: Integer;
|
function TCustomComboBox.GetItemCount: Integer;
|
||||||
|
|
||||||
|
|||||||
@ -505,6 +505,11 @@ begin
|
|||||||
inherited WndProc(Message);
|
inherited WndProc(Message);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TCustomEdit.ShouldAutoAdjustWidthAndHeight: Boolean;
|
||||||
|
begin
|
||||||
|
Result := (Align = alNone);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCustomEdit.CMWantSpecialKey(var Message: TCMWantSpecialKey);
|
procedure TCustomEdit.CMWantSpecialKey(var Message: TCMWantSpecialKey);
|
||||||
begin
|
begin
|
||||||
// don't allow LCL to handle arrow keys for edit controls
|
// don't allow LCL to handle arrow keys for edit controls
|
||||||
|
|||||||
@ -345,6 +345,7 @@ type
|
|||||||
procedure UTF8KeyPress(var UTF8Key: TUTF8Char); override;
|
procedure UTF8KeyPress(var UTF8Key: TUTF8Char); override;
|
||||||
procedure MouseUp(Button: TMouseButton; Shift:TShiftState; X, Y: Integer); override;
|
procedure MouseUp(Button: TMouseButton; Shift:TShiftState; X, Y: Integer); override;
|
||||||
function SelectItem(const AnItem: String): Boolean;
|
function SelectItem(const AnItem: String): Boolean;
|
||||||
|
function ShouldAutoAdjustWidthAndHeight: Boolean; override;
|
||||||
|
|
||||||
property ItemHeight: Integer read GetItemHeight write SetItemHeight;
|
property ItemHeight: Integer read GetItemHeight write SetItemHeight;
|
||||||
property ItemWidth: Integer read GetItemWidth write SetItemWidth default 0;
|
property ItemWidth: Integer read GetItemWidth write SetItemWidth default 0;
|
||||||
@ -764,6 +765,7 @@ type
|
|||||||
procedure WMChar(var Message: TLMChar); message LM_CHAR;
|
procedure WMChar(var Message: TLMChar); message LM_CHAR;
|
||||||
procedure CMWantSpecialKey(var Message: TCMWantSpecialKey); message CM_WANTSPECIALKEY;
|
procedure CMWantSpecialKey(var Message: TCMWantSpecialKey); message CM_WANTSPECIALKEY;
|
||||||
procedure WndProc(var Message: TLMessage); override;
|
procedure WndProc(var Message: TLMessage); override;
|
||||||
|
function ShouldAutoAdjustWidthAndHeight: Boolean; override;
|
||||||
|
|
||||||
property AutoSelect: Boolean read FAutoSelect write FAutoSelect default True;
|
property AutoSelect: Boolean read FAutoSelect write FAutoSelect default True;
|
||||||
property AutoSelected: Boolean read FAutoSelected write FAutoSelected;
|
property AutoSelected: Boolean read FAutoSelected write FAutoSelected;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user