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

QSpinBox: don't use hard-coded constant for the up/down button width

    XMLWordPrintable

Details

    • All
    • aa8d3f90a440575deef914916299b792105d7209 (qt/qtbase/5.13)

    Description

      The QTBUG-67126 was reported to prevent a QDoubleSpinBox sizeHint from becoming too small.

      However, the fix uses a hard-coded constant of 20 pixels for the width of a spin up/down button (in QCommonStyle.cpp).

       

      const int buttonWidth = (vopt->subControls & (QStyle::SC_SpinBoxUp | QStyle::SC_SpinBoxDown)) != 0 ? 20 : 0;

        

      This causes the area reserved for the spin up/down button to become too narrow on a 4K monitor. It seems that it should get the width of a spin up/down button from the (proxy) style.

       

      Note that this bug was not present in Qt 5.6.3.

       

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              ev E Visser
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes