Add support for dimming the colors when losing focus
ClosedPublic

Authored by sandsmark on Oct 14 2018, 4:04 PM.

Details

Summary

pretty vital (at least for me) if one doesn't have compositing.

we can't use the normal QPalette::Inactive because of color schemes,
but I made the new scrollbar color code follow the same dimming colors.

Test Plan

tested with and without compositing, with and without scrollbar,
and dark and light color schemes.

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 created this revision.Oct 14 2018, 4:04 PM
Restricted Application added a project: Konsole. · View Herald TranscriptOct 14 2018, 4:04 PM
Restricted Application added a subscriber: konsole-devel. · View Herald Transcript
sandsmark requested review of this revision.Oct 14 2018, 4:04 PM

I think this also fixes the colors when changing system colors (I don't think the new scrollbar color code works well with 568095c482785903148130fe72ee3d45f325c453).

occured to me that this might be useful for e. g. split views as well, so not only dimming when the window loses focus. should I change it to just check for widget focus?

KWin has itself this feature for all windows, i've use it, this can be helpful on split view, did you test it with KWin effect enabled to verify that it does not look strange/incorrect?

yeah, this is more when I can't use KWin or another compositor. I tested with a compositor now, and even with it turned on it didn't look as bad as I feared (not too dark, still readable).

sandsmark updated this revision to Diff 43610.Oct 14 2018, 6:11 PM

started using it on my system, and noticed that some colors didn't get dimmed, and those are the ones that aren't normal terminal colors from the color scheme... so instead just use a simpler solution by drawing a semi-transparent black rect on top.

Can you fix this patch as well?

sandsmark updated this revision to Diff 44240.Oct 26 2018, 8:04 AM

fixed the prefixes so phabricator is happy

hindenburg retitled this revision from add support for dimming the colors when losing focus to Add support for dimming the colors when losing focus.Oct 27 2018, 7:24 PM
hindenburg edited the summary of this revision. (Show Details)
hindenburg edited the test plan for this revision. (Show Details)
hindenburg accepted this revision.Oct 27 2018, 8:21 PM
This revision is now accepted and ready to land.Oct 27 2018, 8:21 PM
This revision was automatically updated to reflect the committed changes.