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:
ondrej 2017-03-18 07:58:07 +00:00
parent b823ce3277
commit de5ec9a11d
2 changed files with 4 additions and 8 deletions

View File

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

View File

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