mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-11 00:28:18 +02:00
lcl: TToolBar: highDPI: scale DropDownWidth
git-svn-id: trunk@53562 -
This commit is contained in:
parent
a15905d3ab
commit
efdc1a1a7e
@ -2234,8 +2234,7 @@ type
|
||||
Simulate: boolean): Boolean;
|
||||
procedure CNDropDownClosed(var Message: TLMessage); message CN_DROPDOWNCLOSED;
|
||||
procedure DoAutoAdjustLayout(const AMode: TLayoutAdjustmentPolicy;
|
||||
const AXProportion, AYProportion: Double; const AScaleFonts: Boolean);
|
||||
override;
|
||||
const AXProportion, AYProportion: Double; const AScaleFonts: Boolean); override;
|
||||
public
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
|
@ -348,8 +348,13 @@ begin
|
||||
|
||||
if AMode in [lapAutoAdjustWithoutHorizontalScrolling, lapAutoAdjustForDPI] then
|
||||
begin
|
||||
ButtonWidth := Round(ButtonWidth * AXProportion);
|
||||
ButtonHeight := Round(ButtonHeight * AYProportion);
|
||||
BeginUpdate;
|
||||
try
|
||||
SetButtonSize(Round(ButtonWidth * AXProportion), Round(ButtonHeight * AYProportion));
|
||||
DropDownWidth := Round(DropDownWidth * AXProportion);
|
||||
finally
|
||||
EndUpdate;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user