mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 12:30:36 +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;
|
BeginUpdate;
|
||||||
try
|
try
|
||||||
SetButtonSize(Round(ButtonWidth * AXProportion), Round(ButtonHeight * AYProportion));
|
SetButtonSize(Round(ButtonWidth * AXProportion), Round(ButtonHeight * AYProportion));
|
||||||
FThemeButtonDropWidth := Round(FThemeButtonDropWidth * AXProportion);
|
|
||||||
FThemeDropDownWidth := Round(FThemeDropDownWidth * AXProportion);
|
|
||||||
if DropDownWidth<>cDropDownWidth then
|
if DropDownWidth<>cDropDownWidth then
|
||||||
DropDownWidth := Round(DropDownWidth * AXProportion);
|
DropDownWidth := Round(DropDownWidth * AXProportion);
|
||||||
FToolBarFlags := FToolBarFlags + [tbfUpdateVisibleBarNeeded];
|
FToolBarFlags := FToolBarFlags + [tbfUpdateVisibleBarNeeded];
|
||||||
@ -451,7 +449,7 @@ end;
|
|||||||
function TToolBar.GetRealDropDownWidth: Integer;
|
function TToolBar.GetRealDropDownWidth: Integer;
|
||||||
begin
|
begin
|
||||||
if FDropDownWidth < 0 then
|
if FDropDownWidth < 0 then
|
||||||
Result := FThemeDropDownWidth
|
Result := MulDiv(FThemeDropDownWidth, Font.PixelsPerInch, Screen.PixelsPerInch)
|
||||||
else
|
else
|
||||||
Result := FDropDownWidth;
|
Result := FDropDownWidth;
|
||||||
end;
|
end;
|
||||||
@ -459,7 +457,7 @@ end;
|
|||||||
function TToolBar.GetRealButtonDropWidth: Integer;
|
function TToolBar.GetRealButtonDropWidth: Integer;
|
||||||
begin
|
begin
|
||||||
if FDropDownWidth < 0 then
|
if FDropDownWidth < 0 then
|
||||||
Result := FThemeButtonDropWidth
|
Result := MulDiv(FThemeButtonDropWidth, Font.PixelsPerInch, Screen.PixelsPerInch)
|
||||||
else
|
else
|
||||||
Result := FDropDownWidth+FThemeButtonDropWidth-FThemeDropDownWidth;
|
Result := FDropDownWidth+FThemeButtonDropWidth-FThemeDropDownWidth;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user