use Kirigami Theme for colors
ClosedPublic

Authored by mart on Sep 22 2017, 4:56 PM.

Diff Detail

Repository
R858 Qt Quick Controls 2: Desktop Style
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mart created this revision.Sep 22 2017, 4:56 PM
Restricted Application added a project: Plasma. · View Herald TranscriptSep 22 2017, 4:56 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript

This is set to be a framework.
We can't have a framework that imports something from workspace.

org.kde.desktop/Label.qml
32

This change is unrelated.
Also I said in a review about how we shouldn't be doing this.

plugin/kquickstyleitem.cpp
167

I don't understand what this is doing? It looks wrong?

710

This area needs some tidying.

Also we need this line if the palette isn't explicitly set to something else.

mart added a comment.Sep 26 2017, 12:52 PM

This is set to be a framework.
We can't have a framework that imports something from workspace.

it imports kirigami, which is a framework, so it just makes it tier2

org.kde.desktop/Label.qml
32

it is as since StylePrivate is mostly binding QPalette colors, all its uses should be eventually removed

plugin/kquickstyleitem.cpp
167

it's getting (and eventually creating if didn't exist yet) the attached property Kirigami.Theme, which is a subclass of the public symbol PlatformTheme, which is guaranteed to exist at that point

710

definitely a mess, yeah :)
Anyways, the idea is not to use anymore the qapplication's palette as areas of the application window can use a completely different palette.
so m_theme->palette() will fallback to QApplication::palette() when the runtime integration to kcolorscheme is not installed, and instead will be built upon KColorscheme when D7940 is installed

plugin/kquickstyleitem.cpp
167

I meant specifically the setInherit

that's also exposed in QML and you have that being explicitly set there.

mart updated this revision to Diff 19940.Sep 26 2017, 3:30 PM

remove dead code

update colors on the fly on qapp palette change

Restricted Application added a project: Kirigami. · View Herald TranscriptSep 26 2017, 3:30 PM
mart added inline comments.Sep 26 2017, 3:30 PM
plugin/kquickstyleitem.cpp
167

ouch yeah, that's actually a leftover :)

mart updated this revision to Diff 19942.Sep 26 2017, 3:33 PM

proper diff?

This revision was automatically updated to reflect the committed changes.
mart reopened this revision.Sep 26 2017, 3:36 PM
mart updated this revision to Diff 19981.Sep 27 2017, 2:07 PM
  • use Kirigami Theme for colors
  • clean dead code
  • use kirigami colors
  • get rid of SystemPaletteSingleton and TextSingleton
This revision was automatically updated to reflect the committed changes.
mart reopened this revision.Oct 3 2017, 2:21 PM
mart updated this revision to Diff 20296.Oct 3 2017, 2:21 PM
  • add the kirigami plasma desktop integration here
hein accepted this revision.Oct 3 2017, 2:32 PM
This revision is now accepted and ready to land.Oct 3 2017, 2:32 PM
This revision was automatically updated to reflect the committed changes.

Is 5.39 tagged already?

kirigami-plasmadesktop-integration/plasmadesktoptheme.cpp
49

and disconnect from the old window

83

This is bad

If some other place miles away in a random lib in a different place in the UI, sets a colour, it will be wrong.

Why meddle with the global loader if you're passing it as an arg anyway?

mart marked an inline comment as done.Oct 3 2017, 9:34 PM

Is 5.39 tagged already?

should be tagged next saturday.

the two issues are adressed in master.

bcooksley reopened this revision.Oct 6 2017, 6:23 PM
bcooksley added a subscriber: bcooksley.

This code introduces a new dependency which has yet to be declared in the kde-build-metadata repository.
As this has been several days now, i'll be reverting this commit and any others which interfere in the revert process in 24 hours if this isn't corrected.

This revision is now accepted and ready to land.Oct 6 2017, 6:23 PM
mart closed this revision.Oct 10 2017, 9:26 AM

dependencies are up to date now in metadata