Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-6905

font-weight: bold can truncate tab label

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 4.5.2
    • Fix Version/s: 6.2.2, 6.3
    • Component/s: Widgets: Style Sheets
    • Labels:
      None
    • Environment:
      Fedora 11 KDE
    • Commits:
      1acffda4dd6e737376a54f9b3775dd3470d5349f (qt/tqtc-qtbase/6.2)

      Description

      Steps to recreate:

      Create a QTabWidget and give but the following as its style sheet:

      QTabBar::tab {

      }

      QTabBar::tab:selected

      { font-weight: bold; }

      Create at least 2 tabs on the QTabWidget and set the label to one of them to: "ManufacturerManufacturerManufacturer"

      When this tab is selected, much of the label is not visible because the bolded text is much wider than the normal text. Each tab needs to either 1) resize itself on each selected, hover, !selected, etc event or 2) The first time it is rendered it needs to check against all (pseudo)-states and size it so the largest one fits.

      I realized "ManufacturerManufacturerManufacturer" seems like a frivolous name, but this bug can affect much smaller texts when additional styling is applied. I've excluded the other styling for simplicity.

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              vhilshei Volker Hilsheimer
              Reporter:
              ricochet2200 Rick Smith
              Votes:
              7 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews