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

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

XMLWordPrintable

    • All
    • aa8d3f90a440575deef914916299b792105d7209 (qt/qtbase/5.13)

      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.

       

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

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

              Created:
              Updated:

                There are no open Gerrit changes