mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-05 23:17:10 +01:00
lcl: themes: High-DPI: scale default (hard-coded) detail sizes. Solves issue #31557 on Qt+Gtk2
git-svn-id: trunk@54439 -
This commit is contained in:
parent
b823ce3277
commit
de5ec9a11d
@ -180,18 +180,10 @@ begin
|
||||
GetThemePartSize(GetTheme(Details.Element), 0, Details.Part, Details.State, @R, TS_TRUE, Result);
|
||||
end
|
||||
else
|
||||
begin
|
||||
Result := inherited GetDetailSize(Details);
|
||||
Result.cx := MulDiv(Result.cx, ScreenInfo.PixelsPerInchX, 96);
|
||||
Result.cy := MulDiv(Result.cy, ScreenInfo.PixelsPerInchY, 96);
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Result := inherited GetDetailSize(Details);
|
||||
Result.cx := MulDiv(Result.cx, ScreenInfo.PixelsPerInchX, 96);
|
||||
Result.cy := MulDiv(Result.cy, ScreenInfo.PixelsPerInchY, 96);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TWin32ThemeServices.GetDetailRegion(DC: HDC;
|
||||
|
||||
@ -1897,6 +1897,10 @@ begin
|
||||
if Details.Part in [WP_SMALLCLOSEBUTTON, WP_MDICLOSEBUTTON, WP_MDIHELPBUTTON, WP_MDIMINBUTTON, WP_MDIRESTOREBUTTON, WP_MDISYSBUTTON] then
|
||||
Result := Size(9, 9);
|
||||
end;
|
||||
if (Result.cx>0) then
|
||||
Result.cx := MulDiv(Result.cx, ScreenInfo.PixelsPerInchX, 96);
|
||||
if (Result.cy>0) then
|
||||
Result.cy := MulDiv(Result.cy, ScreenInfo.PixelsPerInchY, 96);
|
||||
end;
|
||||
|
||||
function TThemeServices.GetDetailRegion(DC: HDC;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user