search for a default wallpaper in lookandfeel
ClosedPublic

Authored by mart on May 15 2019, 2:01 PM.

Details

Summary

now look and feel packages can specify a default image wallpaper.
when a new containment is created at first plasma start or at activity creation
search for a default wallpaper inthe order:
look and feel package
if fails, from the plasma theme

we are sure to find a default after it as if neither of those specify one,
the wallpaper specified by the breeze plasma theme (Next) will be used

D21225 takes care of setting the wallpaper when a lnf theme is selected by the kcm

Test Plan

tested to start plasma with an empty config file with different themes
that do or don't include wallpapers

Diff Detail

Repository
R120 Plasma Workspace
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.May 15 2019, 2:01 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 15 2019, 2:01 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mart requested review of this revision.May 15 2019, 2:01 PM

Didn't we move contents/layout.js to be part of the lookandfeel and that was the previous way to set a default wallpaper?

mart added a comment.May 15 2019, 2:24 PM

Didn't we move contents/layout.js to be part of the lookandfeel and that was the previous way to set a default wallpaper?

layout.js is mostly to create a whole layout from scratch (like, put all my panels like in Unity) you can also set a wallpaper in the js, but necessitates to destroy the current plasma layout.

that is supported too, and is necessary if one wants to put something not image, it's quite overkill for simple themes
also, in layout.js works only if in the kcm one checks the box of resetting the plasma layout, meaning is necessary to lose the whole plasma setup in order to apply the wallpaper.
this makes it for a simpler way not mutually exclusive.

mart updated this revision to Diff 58130.May 15 2019, 3:12 PM
  • use proper path of the package

BTW, there is also still code in place to support Plasma Themes defining a default wallpaper (or even deploy some more). Though the default & the further are not listed in the Image wallpaper config, also is the config not offering any hint about the default or to reset to using any default.

Has this been considered already? Only noticed recently, but did not want to create a new theme work can for me :)

Given lookandfeel also allows to set Plasma Theme, should the default wallpaper image really be duplicated as another property also with the LookAndFeel theme?

mart added a comment.May 15 2019, 4:15 PM

Has this been considered already? Only noticed recently, but did not want to create a new theme work can for me :)

That's what the code in that function i left untouched does line 285 onwards.

This makes me think that probably i should not define a default wallpaper in the breeze lnf, but rather in the lnf kcm when i'm re-setting the wallpaper to also look in the plasma theme if the lnf does not specify any. this way when using the breeze lnf the default wallpaper would still come from the plasma theme

davidedmundson accepted this revision.Wed, Jan 29, 12:15 PM

So default wallpaper is effectively via any of:

  • The active LNF
  • the plasma theme
  • LNF/layout.js
  • desktoppackage/layout.js
  • containment specific override hooks

I will accept this on the condition that we mark the Plasma::theme one as deprecated.
I don't even think we need to load it here if we update the breeze one.

I don't want to say this, but maybe stable branch is a good idea as then we can resolve this .png vs .jpeg issue

This revision is now accepted and ready to land.Wed, Jan 29, 12:15 PM
This revision was automatically updated to reflect the committed changes.

Would this handle the case where an existing look-and-feel package that did NOT specify a wallpaper, then in a new version adds one? And that occurs on a users system the l-n-f package was already active and plasma is long past 1st plasma start.