mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-15 22:40:43 +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;
|
||||
end;
|
||||
|
||||
function TCustomComboBox.ShouldAutoAdjustWidthAndHeight: Boolean;
|
||||
begin
|
||||
Result := (Align = alNone);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
function TCustomComboBox.GetItemCount: Integer;
|
||||
|
||||
|
||||
@ -505,6 +505,11 @@ begin
|
||||
inherited WndProc(Message);
|
||||
end;
|
||||
|
||||
function TCustomEdit.ShouldAutoAdjustWidthAndHeight: Boolean;
|
||||
begin
|
||||
Result := (Align = alNone);
|
||||
end;
|
||||
|
||||
procedure TCustomEdit.CMWantSpecialKey(var Message: TCMWantSpecialKey);
|
||||
begin
|
||||
// don't allow LCL to handle arrow keys for edit controls
|
||||
|
||||
@ -345,6 +345,7 @@ type
|
||||
procedure UTF8KeyPress(var UTF8Key: TUTF8Char); override;
|
||||
procedure MouseUp(Button: TMouseButton; Shift:TShiftState; X, Y: Integer); override;
|
||||
function SelectItem(const AnItem: String): Boolean;
|
||||
function ShouldAutoAdjustWidthAndHeight: Boolean; override;
|
||||
|
||||
property ItemHeight: Integer read GetItemHeight write SetItemHeight;
|
||||
property ItemWidth: Integer read GetItemWidth write SetItemWidth default 0;
|
||||
@ -764,6 +765,7 @@ type
|
||||
procedure WMChar(var Message: TLMChar); message LM_CHAR;
|
||||
procedure CMWantSpecialKey(var Message: TCMWantSpecialKey); message CM_WANTSPECIALKEY;
|
||||
procedure WndProc(var Message: TLMessage); override;
|
||||
function ShouldAutoAdjustWidthAndHeight: Boolean; override;
|
||||
|
||||
property AutoSelect: Boolean read FAutoSelect write FAutoSelect default True;
|
||||
property AutoSelected: Boolean read FAutoSelected write FAutoSelected;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user