https://bugs.kde.org/show_bug.cgi?id=440718

            Bug ID: 440718
           Summary: Breeze spinboxes draw empty space even when buttons
                    disabled (QAbstractSpinBox::NoButtons)
           Product: Breeze
           Version: 5.22.4
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: QStyle
          Assignee: plasma-b...@kde.org
          Reporter: nyanpas...@tuta.io
                CC: noaha...@gmail.com
  Target Milestone: ---

Created attachment 140579
  --> https://bugs.kde.org/attachment.cgi?id=140579&action=edit
Code project to reproduce the bug.

SUMMARY
In a Qt app containing a QSpinBox/etc. with
setButtonSymbols(Q[*]SpinBox::NoButtons), the missing buttons still take up
space.

STEPS TO REPRODUCE
1. Download, build, and run my attached project. It constructs two QSpinBox The
relevant code is as follows:

    auto w = new QSpinBox(c);
    w->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
    w->setRange(0, 99);
    w->setValue(99);
    w->setButtonSymbols(QSpinBox::NoButtons);

OBSERVED RESULT
There is empty white space to the right of the spinbox with no buttons,
matching the white space to the right of the spinbox with buttons.

EXPECTED RESULT
The spinbox with QSpinBox::NoButtons set should have a smaller size hint and
not draw empty space to the right of the text field.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.2
Kernel Version: 5.13.7-zen1-1-zen (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce GT 730/PCIe/SSE2

ADDITIONAL INFORMATION
I've been poking at this bug locally for a bit. The whitespace's width is
SpinBox_ArrowButtonWidth, so grepping for that string should bring up all code
responsible for drawing the whitespace. Breeze is being reworked for Plasma
5.23, but the portions of the code I've seen so far are unchanged between
5.22.4 and master.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to