Apply full screen color scheme also to window decoration
ClosedPublic

Authored by broulik on Sep 26 2017, 1:39 PM.

Details

Summary

Makes use of the KDE_COLOR_SCHEME_PATH property that has KWin apply a given color scheme to the decoration.
Ensures there's no ugly white borders on the otherwise dark confirmation dialogs.

Test Plan


Top is before
Bottom is after

I bet there's a bug report on bko but didn't find one at quick glance.
Didn't try with a custom colorscheme and I think Gwenview and Kwin disagree on where to look for it but with the default one that is passed as absolute path to kwin it works and this fixes a visual glitch affecting for 99% of users.

Diff Detail

Repository
R260 Gwenview
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Sep 26 2017, 1:39 PM

It shouldn't be needed

qApp->setPalette will be picked up by:
bool ColorSchemeFilter::eventFilter(QObject *object, QEvent *event)

in KStyle

Do you know why it doesn't?

broulik updated this revision to Diff 19939.Sep 26 2017, 1:52 PM
  • Set property before changing palette so it also applies it to the main window

Under what conditions does this issue happen? Even without your patch, I can't reproduce it with Gwenview from current git master using the Breeze Dark look-and-feel in KDE Neon:

cfeck added a comment.Sep 26 2017, 6:48 PM

Gwenview switches to a dark scheme when going full screen. To test this patch, use a bright (default) theme, and run Gwenview. Then switch Gwenview to full screen mode.

ngraham accepted this revision.Sep 26 2017, 7:59 PM

Confirmed that the patch works. The effect isn't quite as dramatic with the standard Breeze light theme, but the issue is real.

Before:

After:

This revision is now accepted and ready to land.Sep 26 2017, 7:59 PM
This revision was automatically updated to reflect the committed changes.