lcl: TToolBar: highDPI: scale DropDownWidth

git-svn-id: trunk@53562 -
This commit is contained in:
ondrej 2016-12-05 20:58:53 +00:00
parent a15905d3ab
commit efdc1a1a7e
2 changed files with 8 additions and 4 deletions

View File

@ -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;

View File

@ -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;