The combobox needs to be 2 pixels wider for contents to fit

Authored by antlarr on Oct 31 2016, 4:59 PM.

Description

The combobox needs to be 2 pixels wider for contents to fit

Summary:
When the size of the combo box adjusts to its contents, the dropdown
listbox isn't large enough to fit the contents and a vertical scrollbar
so instead of using Metrics::MenuButton_IndicatorWidth. I defined
a new Metrics::ComboBox_IndicatorWidth which is two pixels larger than
Metrics::MenuButton_IndicatorWidth.

To test this I used "kcmshell5 kcm_kscreen -style breeze" and opened
the resolutions QComboBox (If there are less than 15 possible
resolutions, a slider will appear instead of a QComboBox, so in that
case it's possible to use a virtual machine with QXL video that for
me shows plenty of possible resolutions).

Before this patch, most of the larger resolutions are shortened to
something like "192...200" or "160...200" and can't be read (in the
dropdown listbox, when selected they can be read correctly in the
closed combobox), after applying this patch, all the contents of the
listbox can be read correctly.

Reviewers: Plasma, Plasma:_design, hpereiradacosta

Reviewed By: hpereiradacosta

Subscribers: hpereiradacosta, davidedmundson, plasma-devel

Tags: Plasma, Plasma:_design

Differential Revision: https://phabricator.kde.org/D3192

Details

Committed
antlarrOct 31 2016, 5:11 PM
Reviewer
hpereiradacosta
Differential Revision
D3192: The combobox needs to be 2 pixels wider for contents to fit
Parents
R31:e33206e4f74f: Show full scrollbar only on mouse over
Branches
Unknown
Tags
Unknown