Mikołaj Zalewski : comctl32: toolbar: The string should be included in the height of a button-less toolbar only if there is a string in the pool .
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Nov 2 05:46:49 CST 2006
Module: wine
Branch: master
Commit: 9ec280c25846357d2355ef107f958e3127bf2faf
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9ec280c25846357d2355ef107f958e3127bf2faf
Author: Mikołaj Zalewski <mikolaj at zalewski.pl>
Date: Wed Nov 1 22:47:20 2006 +0100
comctl32: toolbar: The string should be included in the height of a button-less toolbar only if there is a string in the pool.
---
dlls/comctl32/toolbar.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c
index 1a6f603..2024314 100644
--- a/dlls/comctl32/toolbar.c
+++ b/dlls/comctl32/toolbar.c
@@ -1226,7 +1226,7 @@ TOOLBAR_CalcStrings (HWND hwnd, LPSIZE l
hdc = GetDC (hwnd);
hOldFont = SelectObject (hdc, infoPtr->hFont);
- if (infoPtr->nNumButtons == 0)
+ if (infoPtr->nNumButtons == 0 && infoPtr->nNumStrings > 0)
{
TEXTMETRICW tm;
@@ -3460,11 +3460,8 @@ TOOLBAR_GetButtonSize (HWND hwnd)
{
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
- if (infoPtr->nNumButtons > 0)
- return MAKELONG((WORD)infoPtr->nButtonWidth,
- (WORD)infoPtr->nButtonHeight);
- else
- return MAKELONG(23,22);
+ return MAKELONG((WORD)infoPtr->nButtonWidth,
+ (WORD)infoPtr->nButtonHeight);
}
More information about the wine-cvs
mailing list