mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 16:39:15 +02:00
LCL: toolbar: High-DPI: drop-down width
git-svn-id: trunk@54230 -
This commit is contained in:
parent
57d740ca4a
commit
c49da67b40
@ -351,8 +351,6 @@ begin
|
||||
BeginUpdate;
|
||||
try
|
||||
SetButtonSize(Round(ButtonWidth * AXProportion), Round(ButtonHeight * AYProportion));
|
||||
FThemeButtonDropWidth := Round(FThemeButtonDropWidth * AXProportion);
|
||||
FThemeDropDownWidth := Round(FThemeDropDownWidth * AXProportion);
|
||||
if DropDownWidth<>cDropDownWidth then
|
||||
DropDownWidth := Round(DropDownWidth * AXProportion);
|
||||
FToolBarFlags := FToolBarFlags + [tbfUpdateVisibleBarNeeded];
|
||||
@ -451,7 +449,7 @@ end;
|
||||
function TToolBar.GetRealDropDownWidth: Integer;
|
||||
begin
|
||||
if FDropDownWidth < 0 then
|
||||
Result := FThemeDropDownWidth
|
||||
Result := MulDiv(FThemeDropDownWidth, Font.PixelsPerInch, Screen.PixelsPerInch)
|
||||
else
|
||||
Result := FDropDownWidth;
|
||||
end;
|
||||
@ -459,7 +457,7 @@ end;
|
||||
function TToolBar.GetRealButtonDropWidth: Integer;
|
||||
begin
|
||||
if FDropDownWidth < 0 then
|
||||
Result := FThemeButtonDropWidth
|
||||
Result := MulDiv(FThemeButtonDropWidth, Font.PixelsPerInch, Screen.PixelsPerInch)
|
||||
else
|
||||
Result := FDropDownWidth+FThemeButtonDropWidth-FThemeDropDownWidth;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user