Bug 352653 - Dropdowns in widget properties don't follow system color settings. [regression]
Summary: Dropdowns in widget properties don't follow system color settings. [regression]
Status: RESOLVED UPSTREAM
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 5.3.2
Platform: Fedora RPMs Linux
: NOR minor
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords:
: 357019 357049 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-09-13 10:22 UTC by kdebuac.rhn
Modified: 2016-01-14 13:45 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot of the faulty rendering (38.92 KB, image/png)
2015-09-13 10:22 UTC, kdebuac.rhn
Details
Screenshot of correct rendering (same system, same settings, different application) (16.26 KB, image/png)
2015-09-13 10:23 UTC, kdebuac.rhn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kdebuac.rhn 2015-09-13 10:22:15 UTC
This is a regression compared to KDE4.

Dropdowns in seemingly every Plasma dialog only partially respect theme settings, resulting in unreadable text.

Reproducible: Always

Steps to Reproduce:
1. Change to a dark theme (e.g. Breeze Dark)
2. Open desktop settings
3. Click "Wallpaper type"

Actual Results:  
Extremely low contrast results in unreadable text.

Expected Results:  
Widget is styled consistently with the restof the system, or at least is readable.

Fedora 22
Comment 1 kdebuac.rhn 2015-09-13 10:22:41 UTC
Created attachment 94533 [details]
Screenshot of the faulty rendering
Comment 2 kdebuac.rhn 2015-09-13 10:23:25 UTC
Created attachment 94534 [details]
Screenshot of correct rendering (same system, same settings, different application)
Comment 3 Kai Uwe Broulik 2015-09-13 10:48:37 UTC
This is a bug in the QtQuick Controls ComboBox used by Plasma - I reported an upstream bug there: https://bugreports.qt.io/browse/QTBUG-48252
Comment 4 Kai Uwe Broulik 2015-12-20 11:13:52 UTC
Hugo, could you perhaps have a look at this? It affects Breeze and Oxygen as well as Windows 95 style but not the Qt Fusion style. QtQuick Controls ComboBox uses PE_PanelItemViewRow in its ComboBox popup, perhaps we don't style that thing properly?

Relevant code:
qApp->style()->drawPrimitive(QStyle::PE_PanelItemViewRow, m_styleoption, &pixpainter);
if ((style() == "mac" || !qApp->style()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected)) && selected()) {
    pal = QApplication::palette("QAbstractItemView");
    pal.setCurrentColorGroup(m_styleoption->palette.currentColorGroup());
    pixpainter.fillRect(m_styleoption->rect, pal.highlight());
}
Comment 5 Hugo Pereira Da Costa 2015-12-20 12:06:05 UTC
(In reply to Kai Uwe Broulik from comment #4)
> Hugo, could you perhaps have a look at this? It affects Breeze and Oxygen as
> well as Windows 95 style but not the Qt Fusion style. QtQuick Controls
> ComboBox uses PE_PanelItemViewRow in its ComboBox popup, perhaps we don't
> style that thing properly?
> 
> Relevant code:
> qApp->style()->drawPrimitive(QStyle::PE_PanelItemViewRow, m_styleoption,
> &pixpainter);
> if ((style() == "mac" ||
> !qApp->style()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected)) &&
> selected()) {
>     pal = QApplication::palette("QAbstractItemView");
>     pal.setCurrentColorGroup(m_styleoption->palette.currentColorGroup());
>     pixpainter.fillRect(m_styleoption->rect, pal.highlight());
> }

Hi Kai,
From what I can understand, the code above is relevant for the selected item only, whereas the bug is for unselected ones.
And in fact, comparing the correct and incorrect rendering, what seems to be the problem is the color used for the list "background". (possibly incorrect background role).

Anyway, yes, I can try investigate a bit more (but it is likely _not_ in the code mentionned above.
Comment 6 Hugo Pereira Da Costa 2015-12-20 15:58:42 UTC
Any other application than plasmashell (desktop settings) that I could use to reproduce the issue ? (such as a QtQuickControls demo, for instance ?)

Right now plasmashell crashes on my hybrid system (kde4/kf5) and I don't feel like recompiling everything to make it work ...

Thanks in advance,

Hugo
Comment 8 Hugo Pereira Da Costa 2015-12-21 14:36:14 UTC
Thanks Kay !
Comment 9 Hugo Pereira Da Costa 2015-12-21 14:46:37 UTC
In fact, for editable comboboxes, fusion also shows the issue. 
Only for read-only comboboxes it does not, and for such, fusion's rendering (also in the widget case) is quite non-standard. 
I guess i'll look into how they do it in the QFusionStyle and see if I can get the code from there. 
Still : this _is_ an upstream bug.
Comment 10 David Edmundson 2015-12-21 14:50:50 UTC
https://bugreports.qt.io/browse/QTBUG-48252 if you're interested.
Comment 11 Kai Uwe Broulik 2015-12-21 22:25:27 UTC
*** Bug 357019 has been marked as a duplicate of this bug. ***
Comment 12 Kai Uwe Broulik 2015-12-22 15:15:05 UTC
*** Bug 357049 has been marked as a duplicate of this bug. ***