Add action to reset ui color scheme to the kde default one
Needs ReviewPublic

Authored by ahmadsamir on Jun 9 2019, 4:47 PM.

Details

Reviewers
cullmann
dhaumann
Group Reviewers
Kate
VDG
Summary

This basically makes the kate ui follow the kde default color scheme by
removing the ColorScheme config entry from katerc.

BUG: 407859
FIXED-IN: 19.08.0

Test Plan
  • Select any color scheme from Settings -> Color theme, now changing the kde color scheme using systemsettings5 won't affect kate ui
  • Select "Default kde color scheme" from the above menu, the effect is basically the reverse, now kate should follow the kde color scheme

Diff Detail

Repository
R40 Kate
Branch
default-color-theme (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 12608
Build 12626: arc lint + arc unit
ahmadsamir created this revision.Jun 9 2019, 4:47 PM
Restricted Application added a project: Kate. · View Herald TranscriptJun 9 2019, 4:47 PM
ahmadsamir requested review of this revision.Jun 9 2019, 4:47 PM

I took a guess for the fixed-in: field, sorry if it's wrong.

ngraham edited the summary of this revision. (Show Details)Jun 9 2019, 6:45 PM

Very close! Since this is branched from master and it's a new feature with new strings, it will land on master, which will become 19.08.0

As for the UI, I think what might be a bit more elegant is rather than making this an explicit action, instead add a new radio button entry to the top of the menu named Default color scheme (<name of theme>). If that's technically difficult or you're against it though, I won't die on that hill. It's just a recommendation. :)

Very close! Since this is branched from master and it's a new feature with new strings, it will land on master, which will become 19.08.0

Okay.

As for the UI, I think what might be a bit more elegant is rather than making this an explicit action, instead add a new radio button entry to the top of the menu named Default color scheme (<name of theme>). If that's technically difficult or you're against it though, I won't die on that hill. It's just a recommendation. :)

The problem with that approach is that there will be two actions which do the same thing, in two different way:

  • The action that's added by KColorSchemeManager (which adds an action for each available color scheme), and which we use to write the setting to katerc
  • The action that resets the color scheme, i.e. makes kate follow the kde color scheme

It would be a bit confusing. I think of the new action added by this patch as a "Defaults" button in any of the kcm modules, just resetting a setting to the default value.

ngraham added a reviewer: VDG.Jun 10 2019, 7:03 PM

Perhaps we should open it up for VDG comment.

The current patch implements the following in Kate's SettingsColor theme menu:

(o) Breeze
( ) Breeze Dark
( ) Breeze High Contrast
( ) Breeze Light
( ) Honeycomb
( ) etc.
---
Reset to default KDE Color Scheme

My proposal is the following:

(o) Default KDE Color Scheme (Breeze)
---
( ) Breeze
( ) Breeze Dark
( ) Breeze High Contrast
( ) Breeze Light
( ) Honeycomb
( ) etc.

Or now that I think about it, even:

(o) Breeze (default)
( ) Breeze Dark
( ) Breeze High Contrast
( ) Breeze Light
( ) Honeycomb
( ) etc.

With the last proposal the user won't be able to set the the color scheme/theme to Breeze unconditionally in kate (i.e. if the scheme in systemsettings5 is changed kate will follow it).

With the last proposal the user won't be able to set the the color scheme/theme to Breeze unconditionally in kate (i.e. if the scheme in systemsettings5 is changed kate will follow it).

Right. Is there any actual use case for this?

With the last proposal the user won't be able to set the the color scheme/theme to Breeze unconditionally in kate (i.e. if the scheme in systemsettings5 is changed kate will follow it).

Right. Is there any actual use case for this?

The addition of the whole "Settings -> Color theme" feature in kate, i.e. a user who wants to set the color scheme of kate ui regardless of the color scheme of the rest of the system, is the use case. :)

With the last proposal the user won't be able to set the the color scheme/theme to Breeze unconditionally in kate (i.e. if the scheme in systemsettings5 is changed kate will follow it).

Right. Is there any actual use case for this?

The addition of the whole "Settings -> Color theme" feature in kate, i.e. a user who wants to set the color scheme of kate ui regardless of the color scheme of the rest of the system, is the use case. :)

That use case is already implemented by said user choosing a different color scheme though, right? For example, a user with Breeze Light set systemwide wants Kate to be Breeze Dark (or vice versa, or whatever).

What I'm asking is if it ever makes sense for the user to tell Kate to always use the Breeze Light color scheme when the system is itself already using the Breeze Light color scheme.

I just discovered/rediscovered D15645, which upstreams this menu into KConfigWidgets so it's available for every KDE app. I wonder if we should focus there instead?

[..]

What I'm asking is if it ever makes sense for the user to tell Kate to always use the Breeze Light color scheme when the system is itself already using the Breeze Light color scheme.

IMHO, the main point of this feature in kate is having a color scheme setting that is independent from the system color scheme setting.

Doesn't D15645 also do that, though?

kcolorschememanager has no methods to modify the config of the apps that make use of it; it only offers a menu with all the available kde color schemes on the system.

veqz added a subscriber: veqz.Sep 13 2019, 3:10 PM

I'd prefer to just remove the whole thing, myself. But if this is something we decide should be in all KDE apps, then I'd accept it.

D15645 adds it systemwide to all KDE apps, which I strongly prefer.