[UXTHEME] -Slightly improve the width of the caption buttons by scaling it based on the height of the caption buttons. CORE-6000

svn path=/trunk/; revision=74240
This commit is contained in:
Giannis Adamopoulos
2017-03-28 21:31:16 +00:00
parent f754176cb8
commit f1421e61ad
+6 -3
View File
@@ -216,9 +216,7 @@ ThemeDrawCaptionButton(PDRAW_CONTEXT pcontext,
{
RECT rcPart;
INT ButtonWidth, ButtonHeight, iPartId;
ButtonHeight = GetSystemMetrics( pcontext->wi.dwExStyle & WS_EX_TOOLWINDOW ? SM_CYSMSIZE : SM_CYSIZE);
ButtonWidth = GetSystemMetrics( pcontext->wi.dwExStyle & WS_EX_TOOLWINDOW ? SM_CXSMSIZE : SM_CXSIZE);
SIZE ButtonSize;
switch(buttonId)
{
@@ -255,6 +253,11 @@ ThemeDrawCaptionButton(PDRAW_CONTEXT pcontext,
return;
}
GetThemePartSize(pcontext->theme, pcontext->hDC, iPartId, 0, NULL, TS_MIN, &ButtonSize);
ButtonHeight = GetSystemMetrics( pcontext->wi.dwExStyle & WS_EX_TOOLWINDOW ? SM_CYSMSIZE : SM_CYSIZE);
ButtonWidth = MulDiv(ButtonSize.cx, ButtonHeight, ButtonSize.cy);
ButtonHeight -= 4;
ButtonWidth -= 4;