Fix-ish scrollbar background with Qt Fusion style
ClosedPublic

Authored by sandsmark on Mar 2 2019, 7:09 PM.

Details

Summary

The "standard"/fallback Fusion style for Qt uses
QStyleHelper::backgroundColor() to determine if the
scrollbar is drawn on has a dark background.
QStyleHelper::backgroundColor() handles scrollbars
differently from everything else, and tries to get the
palette of the parent widget, and then gets the
QPalette::Base color of that (that probably makes sense
for someone other than me).

I think the scrollbar in the Qt Fusion style has way too
low contrast in the first place, but this way we should
at least invoke the right code in qfusionstyle, so it
can't blame konsole for it.

Test Plan

Break with gdb at qfusionstyle.cpp:2539, verify that
isDarkBg is true.

Diff Detail

Repository
R319 Konsole
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sandsmark requested review of this revision.Mar 2 2019, 7:09 PM
sandsmark created this revision.
sandsmark added a comment.EditedMar 2 2019, 7:17 PM

Removing the changing the lightness of the buttonColor makes it a bit more visible, imho:

If you want to, I can include this in the same patch: http://ix.io/1Cpc

tcanabrava accepted this revision.May 6 2019, 12:23 PM
This revision is now accepted and ready to land.May 6 2019, 12:23 PM
ngraham added a subscriber: ngraham.May 6 2019, 3:34 PM

Just Fusion? What about other styles? If this fixes them too, it can probably close https://bugs.kde.org/show_bug.cgi?id=393423

hindenburg edited the summary of this revision. (Show Details)May 14 2019, 11:36 AM
hindenburg edited the test plan for this revision. (Show Details)
This revision was automatically updated to reflect the committed changes.