Commit 5a622324 authored by David Redondo's avatar David Redondo 🏎

Use the same icon mode calculation for comboboxes as for buttons

Summary: When hovering a focused combobox the icon was in Selected  state resulting in a wrong color.

Test Plan: Hover over a focused combobox that has an icon

Reviewers: broulik, #breeze, ndavis

Reviewed By: #breeze, ndavis

Subscribers: ndavis, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D28908
parent 49cff212
......@@ -4455,13 +4455,10 @@ namespace Breeze
if (!cb->currentIcon.isNull()) {
QIcon::Mode mode;
if ((cb->state & QStyle::State_Selected) && (cb->state & QStyle::State_Active)) {
mode = QIcon::Selected;
} else if (cb->state & QStyle::State_Enabled) {
mode = QIcon::Normal;
} else {
mode = QIcon::Disabled;
}
if( !enabled ) mode = QIcon::Disabled;
else if( !flat && hasFocus ) mode = QIcon::Selected;
else if( mouseOver && flat ) mode = QIcon::Active;
else mode = QIcon::Normal;
const QPixmap pixmap = _helper->coloredIcon(cb->currentIcon,cb->palette, cb->iconSize, mode);
auto iconRect(editRect);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment