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

Minimum size of toolbar with one visible action is too high

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.6.3, 5.9.7, 5.12.0 RC2
    • Fix Version/s: None
    • Component/s: Widgets: Main Window
    • Labels:
      None
    • Platform/s:
      All

      Description

      This problem exists since Qt 4. Qt 3 was ok.

      I have a toolbar with one visible button/action and some invisible separators or invisible buttons/actions. The minimum size is too high, because the size of the extension is added. I think, that the space for the extension should only be added, when more than one item is visible.

      see QToolBarLayout::updateGeomArray

       

      This condition:

      if (items.count() > 1)

        rpick(o, that->minSize) += spacing + extensionExtent;

       

      Should be:

      if (count > 1)

       ...

      count is the number of visible items. The number of invisible items doesn't matter.

        Attachments

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

          Activity

            People

            • Assignee:
              qt.team.quick.subscriptions Qt Quick and Widgets Team
              Reporter:
              volkerh Volker Hemsen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes