restore the "current" color scheme concept
ClosedPublic

Authored by mart on Apr 12 2017, 12:09 PM.

Details

Summary

add again a fake entry called current like there used to be,
add an "Apply" button in the color scheme editor (when not in
standalone app mode) hitting apply will apply whatever custom
set without saving it, will be accessible trough the "current"
entry.

Test Plan

changed a single color in the set, gets correctly applied

Diff Detail

Repository
R119 Plasma Desktop
Branch
arcpatch-D5411
Lint
No Linters Available
Unit
No Unit Test Coverage
mart created this revision.Apr 12 2017, 12:09 PM
Restricted Application added a project: Plasma. · View Herald TranscriptApr 12 2017, 12:09 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript

You've exlained what the patch does, but you've not said why you're doing it.
What does this achieve?

kcms/colors/colorscm.cpp
134

What is this about?
blocking signals is a sign of something else being seriously wrong.

413

Heh, there's some leftovers of the old code here.

At least it makes adding this back easier :)

444

Sometime's we're comparing the name to find out which is "default" sometimes using index.

455–457

If the current design is for saving to be handled by signaling from the dialog to the KCM which does the actual saving. You should handle apply in the same way.

mart updated this revision to Diff 13640.Apr 20 2017, 1:48 PM

adress issues

kcms/colors/colorscm.cpp
134

this is just copied from the old revision before the current entry was removed...
it can be safely removed as i prefer anyways that it highlights the actual current theme (like breeze) instead of the fake entry named "current"

455–457

no, the saving is handled completely in the editor dialog.
this reloads the tiny previews, that is anyways a good thing to do in case of applied as well

davidedmundson accepted this revision.Apr 27 2017, 3:10 PM
This revision is now accepted and ready to land.Apr 27 2017, 3:10 PM
This revision was automatically updated to reflect the committed changes.