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

font-weight: bold can truncate tab label

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 6.2.2, 6.3
    • 4.5.2
    • Widgets: Style Sheets
    • None
    • Fedora 11 KDE
    • 1acffda4dd6e737376a54f9b3775dd3470d5349f (qt/tqtc-qtbase/6.2)

      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.

        For Gerrit Dashboard: QTBUG-6905
        # Subject Branch Project Status CR V

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

              Created:
              Updated:
              Resolved: