Nikolay Sivov : comctl32/tab: Fix filled rectangle calculation for selected button on TCS_BUTTONS.

Alexandre Julliard julliard at winehq.org
Tue Apr 7 09:04:38 CDT 2009


Module: wine
Branch: master
Commit: 5ebc7ba72d1817e39114bdb7a51415846f7765b0
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5ebc7ba72d1817e39114bdb7a51415846f7765b0

Author: Nikolay Sivov <bunglehead at gmail.com>
Date:   Mon Apr  6 17:13:51 2009 -0400

comctl32/tab: Fix filled rectangle calculation for selected button on TCS_BUTTONS.

---

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

diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c
index 525d17b..4eebd15 100644
--- a/dlls/comctl32/tab.c
+++ b/dlls/comctl32/tab.c
@@ -1570,7 +1570,22 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect
 	drawRect->left   += 4;
 	drawRect->top    += 4;
 	drawRect->right  -= 4;
-	drawRect->bottom -= 1;
+
+	if (lStyle & TCS_VERTICAL)
+	{
+	  if (!(lStyle & TCS_BOTTOM)) drawRect->right  += 1;
+	  drawRect->bottom   -= 4;
+	}
+	else
+	{
+	  if (lStyle & TCS_BOTTOM)
+	  {
+	    drawRect->top    -= 2;
+	    drawRect->bottom -= 4;
+	  }
+	  else
+	    drawRect->bottom -= 1;
+	}
       }
       else
       {




More information about the wine-cvs mailing list