comctl32: Fix button theming state.

Samuel Kim ubuntor2000 at gmail.com
Sun Aug 16 01:19:34 CDT 2015


When buttons are pressed and not hot, they should be drawn as hot.
---
 dlls/comctl32/theme_button.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/comctl32/theme_button.c b/dlls/comctl32/theme_button.c
index 7cf4928..16f2f46 100644
--- a/dlls/comctl32/theme_button.c
+++ b/dlls/comctl32/theme_button.c
@@ -324,8 +324,8 @@ static BOOL BUTTON_Paint(HTHEME theme, HWND hwnd, HDC hParamDC)
 
     if(IsWindowEnabled(hwnd))
     {
-        if(state & BST_PUSHED) drawState = STATE_PRESSED;
-        else if(state & BST_HOT) drawState = STATE_HOT;
+        if(state & BST_PUSHED && state & BST_HOT) drawState = STATE_PRESSED;
+        else if(state & BST_PUSHED || state & BST_HOT) drawState = STATE_HOT;
         else if(state & BST_FOCUS) drawState = STATE_DEFAULTED;
         else drawState = STATE_NORMAL;
     }
-- 
2.4.6




More information about the wine-patches mailing list