Enable selecting all installed color schemes in Cuttlefish
Needs ReviewPublic

Authored by davidre on Tue, Nov 12, 3:00 PM.

Details

Reviewers
None
Group Reviewers
Plasma
Summary

By using KColorSchemeManager we can enable viewing icons with all installed
color schemes. Also all the color setting everywhere can be dropped.

Test Plan

Diff Detail

Repository
R118 Plasma SDK
Branch
colorschemes (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 18742
Build 18760: arc lint + arc unit
davidre created this revision.Tue, Nov 12, 3:00 PM
Restricted Application added a project: Plasma. · View Herald TranscriptTue, Nov 12, 3:00 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidre requested review of this revision.Tue, Nov 12, 3:00 PM
davidre planned changes to this revision.Tue, Nov 12, 3:01 PM
davidre edited the test plan for this revision. (Show Details)
davidre added a reviewer: Plasma.

I somehow broke it before uploading

davidre updated this revision to Diff 69639.Tue, Nov 12, 3:08 PM

Was a typo

davidre edited the summary of this revision. (Show Details)Tue, Nov 12, 3:09 PM
davidre added inline comments.Tue, Nov 12, 3:43 PM
cuttlefish/src/main.cpp
130

Moving the setting of the context properties before loading of the file fixes these being unavailable at the beginning. => Less errors on startup and we can select the the current color scheme on startup because the index isn't reset when the color scheme model becomes available.

Nice, it's good to get rid of so much boilerplate.

However when I change the system's own color scheme from Breeze to anything else and start Cuttlefish, the app itself uses that color scheme as expected, but the combobox's text is blank:

Also, the combobox's model appears to have duplicates for Breeze, Breeze Dark, and Breeze Light, which (correctly) don't show up in the colors KCM for me:

Nice, it's good to get rid of so much boilerplate.

However when I change the system's own color scheme from Breeze to anything else and start Cuttlefish, the app itself uses that color scheme as expected, but the combobox's text is blank:

I see what's happening. I copied that code form Kate and it reads the current color scheme name from kdeglobals but there can be a difference between the stored name and the user visible name. Especially when it includes a space or hyphen. So it works correctly for Breeze or Oxygen but not Breeze Dark or Oxygen cold.

Also, the combobox's model appears to have duplicates for Breeze, Breeze Dark, and Breeze Light, which (correctly) don't show up in the colors KCM for me:

Since this directly uses KColorSchemeManager, do you also see duplicated entries in Kate's color scheme menu?

davidre updated this revision to Diff 69667.Wed, Nov 13, 9:20 AM

Load initial color scheme name from the respective .colors file

Also, the combobox's model appears to have duplicates for Breeze, Breeze Dark, and Breeze Light, which (correctly) don't show up in the colors KCM for me:

I think I know what's happening. Do you have Breeze installed into the same prefix as cuttlefish in addition to system breeze? After doing so I also see the duplicate color. (The same happens in Kate)

Since this directly uses KColorSchemeManager, do you also see duplicated entries in Kate's color scheme menu?

Yep.

I think I know what's happening. Do you have Breeze installed into the same prefix as cuttlefish in addition to system breeze? After doing so I also see the duplicate color. (The same happens in Kate)

That's right.