Author: gadamopoulos
Date: Mon Mar  6 21:57:10 2017
New Revision: 74120

URL: http://svn.reactos.org/svn/reactos?rev=74120&view=rev
Log:
[COMCTL32] -Buttons with the BS_PUSHLIKE style are drawn as if they were 
BS_PUSHBUTTON. Fixes the appearance of buttons in the advanced appearance 
dialog.

Modified:
    trunk/reactos/dll/win32/comctl32/theme_button.c

Modified: trunk/reactos/dll/win32/comctl32/theme_button.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/theme_button.c?rev=74120&r1=74119&r2=74120&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/theme_button.c     [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/theme_button.c     [iso-8859-1] Mon Mar  6 
21:57:10 2017
@@ -335,13 +335,19 @@
 {
     DWORD dwStyle;
     DWORD dwStyleEx;
+    DWORD type;
     UINT dtFlags;
     int state;
     ButtonState drawState;
     pfThemedPaint paint;
 
     dwStyle = GetWindowLongW(hwnd, GWL_STYLE);
-    paint = btnThemedPaintFunc[ dwStyle & BUTTON_TYPE ];
+    type = dwStyle & BUTTON_TYPE;
+
+    if (type != BS_PUSHBUTTON && type != BS_DEFPUSHBUTTON && (dwStyle & 
BS_PUSHLIKE))
+        type = BS_PUSHBUTTON;
+
+    paint = btnThemedPaintFunc[type];
     if (!paint)
         return FALSE;
 
@@ -361,7 +367,7 @@
     }
     else drawState = STATE_DISABLED;
 
-    if (drawState == STATE_NORMAL && (dwStyle & BUTTON_TYPE) == 
BS_DEFPUSHBUTTON)
+    if (drawState == STATE_NORMAL && type == BS_DEFPUSHBUTTON)
     {
         drawState = STATE_DEFAULTED;
     }


Reply via email to