Mikołaj Zalewski : comctl32: toolbar: Use the width of the current button instead of nButtonWidth to position the icon .

Alexandre Julliard julliard at wine.codeweavers.com
Thu Nov 2 05:46:54 CST 2006


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

Author: Mikołaj Zalewski <mikolaj at zalewski.pl>
Date:   Wed Nov  1 23:38:30 2006 +0100

comctl32: toolbar: Use the width of the current button instead of nButtonWidth to position the icon.

---

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

diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c
index 42ec39e..8875ca0 100644
--- a/dlls/comctl32/toolbar.c
+++ b/dlls/comctl32/toolbar.c
@@ -896,7 +896,7 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_I
             rcBitmap.left += GetSystemMetrics(SM_CXEDGE) + infoPtr->iListGap / 2;
     }
     else
-        rcBitmap.left += (infoPtr->nButtonWidth - infoPtr->nBitmapWidth) / 2;
+        rcBitmap.left += ((rc.right - rc.left) - infoPtr->nBitmapWidth) / 2;
 
     rcBitmap.top += infoPtr->szPadding.cy / 2;
 




More information about the wine-cvs mailing list