Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
None
-
Operating System: ReactOS
Platform: x86 Hardware
Description
A toolbar button displays its text even when the number of text lines has been set to zero (using TB_SETMAXTEXTROWS message). With auto-sized buttons this is invisible, since the frame around the (correctly placed) icon is not big enough.
In PAINT.EXE the buttons are a few pixels bigger, so a few pixel rows of text are shown.
Problem seems to be in reactos/dll/win32/comctl32/toolbar.c:
when lines 1047/1048 (i.e. in method TOOLBAR_DrawButton)
if (!(infoPtr->dwExStyle & TBSTYLE_EX_MIXEDBUTTONS) || (btnPtr->fsStyle & BTNS_SHOWTEXT))
TOOLBAR_DrawString (infoPtr, &rcText, lpText, &tbcd, dwItemCDFlag);
are extended to
if ((!(infoPtr->dwExStyle & TBSTYLE_EX_MIXEDBUTTONS) || (btnPtr->fsStyle & BTNS_SHOWTEXT))
&& (infoPtr->nMaxTextRows > 0))
TOOLBAR_DrawString (infoPtr, &rcText, lpText, &tbcd, dwItemCDFlag);
the bug seems to disappear.