Set CombooBox QStyleOptionState == On rather than Sunken to match qwidgets

Authored by davidedmundson on Jan 16 2019, 12:45 PM.

Description

Set CombooBox QStyleOptionState == On rather than Sunken to match qwidgets

Summary:
See the end of QComboBox::initStyleOption

if (d->container && d->container->isVisible())
    option->state |= QStyle::State_On;

The relevant breeze code reads:

const bool hasFocus( enabled && ( state & (State_HasFocus |

State_Sunken ) ) );

const bool sunken( state & (State_On|State_Sunken) );

So we still remain sunken in breeze, but we don't assume hasFocus, which
gives the background an incorrect colour.

CCBUG: 403153

Test Plan:
Ran testComboBox from Aleix
Debug inside Breeze QStyle + reading Qt code

Reviewers: broulik

Reviewed By: broulik

Subscribers: broulik, plasma-devel

Tags: Plasma

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

Details

Committed
davidedmundsonJan 16 2019, 12:45 PM
Reviewer
broulik
Differential Revision
D18284: Set CombooBox QStyleOptionState == On rather than Sunken to match qwidgets
Parents
R858:4f00b0cabc12: Fix ComboBox
Branches
Unknown
Tags
Unknown