add colour scheme chooser to oxygen-demo
ClosedPublic

Authored by rjvbb on Mar 20 2017, 3:07 PM.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
rjvbb created this revision.Mar 20 2017, 3:07 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 20 2017, 3:07 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
rjvbb removed a project: Plasma.Mar 20 2017, 3:07 PM
rjvbb removed a subscriber: plasma-devel.
rjvbb added a comment.Mar 24 2017, 4:20 PM

I now also have a simple class that provides a widget style menu: what do you think of the idea of adding support for changing the widget style too?

I didn't want to bring this up at first because the app is still called "oxygen-demo" and the style can already be selected from the commandline, but it could make sense to allow changing the style interactively.

hpereiradacosta accepted this revision.Mar 25 2017, 8:40 AM

some comments:

  • before pushing, it would be nice if the two new files were indented in a similar way as the rest of oxygen (though I can do that myself later on)
  • yes I agree that a similar button allowing to quickly change the style, next to the color scheme would be nice. In the past though I had notice that changing the style of an application "on fly", as opposed to restarting it, would sometime create "issues" depending on how well a given style would implement "unpolish" methods.
  • I also agree that this code should better be located outside of oxygen, and rather be a show case for our widget styles (oxygen, breeze, qtcurve etc.) Some "kstyle-demo"

I think that the "frameworks-integration" framework, where kstyle is implemented, would be a nice place for it, either as a kstyle subdirectory, or side by side with it. wdyt ?

kstyle/demo/oxygenschemechooser.h
40

Would be nice if the indentation would more or less follow the (unofficial) one used in the rest of the oxygen code.

This revision is now accepted and ready to land.Mar 25 2017, 8:40 AM
rjvbb updated this revision to Diff 12787.Mar 25 2017, 11:00 AM
rjvbb marked an inline comment as done.

final version.

  • before pushing, it would be nice if the two new files were indented in a similar way as the rest of oxygen (though I can do that myself later on)

Done (I hope :))

  • yes I agree that a similar button allowing to quickly change the style, next to the color scheme would be nice. In the past though I had notice that changing the style of an application "on fly", as opposed to restarting it, would sometime create "issues" depending on how well a given style would implement "unpolish" methods.

OK, I'll see what my little class looks like once adapted.
Those issues you mention seem like an additional argument to support run-time theme changes; that way "oxygen-demo" becomes more of a comprehensive simple style test-case rather than just being a style showcase.

  • I also agree that this code should better be located outside of oxygen, and rather be a show case for our widget styles (oxygen, breeze, qtcurve etc.) Some "kstyle-demo" I think that the "frameworks-integration" framework, where kstyle is implemented, would be a nice place for it, either as a kstyle subdirectory, or side by side with it. wdyt ?

Yes, I had the same idea, provided it doesn't increase the framework dependencies beyond reason. As to the name, the question is to what extent the demo currently uses KDE or KStyle specific widgets beyond the KColorSchemeManager. And "Explorer" would also be appropriate, instead of "Demo". I have no real preference there, though.