Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-4501

PATCH: Toolbar button displays text even with MaxTextRows=0[WINE]

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • Win32SS
    • 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.

      Attachments

        1. patch
          0.4 kB
          Benedikt Freisen
        2. patch.patch
          0.6 kB
          vicmarcal

        Activity

          People

            bug zilla Bug Zilla
            gyROS Benedikt Freisen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: