[1/2] comctl32: Fix button background filling on TCS_BUTTONS

Nikolay Sivov bunglehead at gmail.com
Sun Mar 15 04:37:40 CDT 2009


On TCS_BUTTONS style entire backgroud of selected button should be filled with
pattern (in other words no need to adjust rectangle for this case).

Changelog:
    - Fix button background filling on TCS_BUTTONS

>From 8b1b96ba314356fe7ad5538d4f9b41b62f83faa7 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Sun, 15 Mar 2009 05:22:49 -0400
Subject: Fix button background filling on TCS_BUTTONS

---
 dlls/comctl32/tab.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c
index 3880ceb..3af09cb 100644
--- a/dlls/comctl32/tab.c
+++ b/dlls/comctl32/tab.c
@@ -1434,7 +1434,6 @@ TAB_EraseTabInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect
     BOOL     deleteBrush = TRUE;
     RECT     rTemp = *drawRect;
 
-    InflateRect(&rTemp, -2, -2);
     if (lStyle & TCS_BUTTONS)
     {
 	if (iItem == infoPtr->iSelected)
@@ -1474,6 +1473,7 @@ TAB_EraseTabInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect
     }
     else /* !TCS_BUTTONS */
     {
+        InflateRect(&rTemp, -2, -2);
         if (!GetWindowTheme (infoPtr->hwnd))
 	    FillRect(hdc, &rTemp, hbr);
     }
-- 
1.5.6.5





More information about the wine-patches mailing list