Author: gadamopoulos
Date: Tue Mar 28 21:31:16 2017
New Revision: 74240
URL:
http://svn.reactos.org/svn/reactos?rev=74240&view=rev
Log:
[UXTHEME] -Slightly improve the width of the caption buttons by scaling it based on the
height of the caption buttons. CORE-6000
Modified:
trunk/reactos/dll/win32/uxtheme/nonclient.c
Modified: trunk/reactos/dll/win32/uxtheme/nonclient.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/nonclien…
==============================================================================
--- trunk/reactos/dll/win32/uxtheme/nonclient.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/uxtheme/nonclient.c [iso-8859-1] Tue Mar 28 21:31:16 2017
@@ -216,9 +216,7 @@
{
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)
{
@@ -254,6 +252,11 @@
//FIXME: Implement Help Button
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;