Support solid colour and image backgrounds with a configurable background colour in the SDDM theme
ClosedPublic

Authored by bgupta on Oct 7 2016, 6:00 PM.

Details

Reviewers
davidedmundson
Summary

This patch reworks the Background component in the SDDM theme to support distinct "image" and "color" modes, with a background image being displayed in the former mode and a solid colour in the latter.

It further adds the background colour and the background type to the configuration file.

This patch does not touch the KCM. That will be a separate patch.

Test Plan

Tested with sddm-greeter --theme path/to/theme. Works fine.

Diff Detail

Repository
R120 Plasma Workspace
Lint
Lint Skipped
Unit
Unit Tests Skipped
bgupta updated this revision to Diff 7206.Oct 7 2016, 6:00 PM
bgupta retitled this revision from to Support solid colour and image backgrounds with a configurable background colour in the SDDM theme.
bgupta updated this object.
bgupta edited the test plan for this revision. (Show Details)
bgupta added a reviewer: davidedmundson.
bgupta set the repository for this revision to R120 Plasma Workspace.
Restricted Application added a project: Plasma. · View Herald TranscriptOct 7 2016, 6:00 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
markuss added a subscriber: markuss.EditedOct 8 2016, 12:35 PM

This patch modifies an existing file. Removing the original copyright is illegal! If you want your new code to be under a different license (which is fine), you need to rework the header to state: "Originally based on XY by XY under the following conditions XYZ" or something like that, although I personally think changing the license adds to much confusion for too little gain. With the original license intact, just a second copyright line is needed.

This patch modifies an existing file. Removing the original copyright is illegal! If you want your new code to be under a different license (which is fine), you need to rework the header to state: "Originally based on XY by XY under the following conditions XYZ" or something like that, although I personally think changing the license adds to much confusion for too little gain. With the original license intact, just a second copyright line is needed.

That's just git-diff finding similarities between the older file and the newer one. I re-wote the whole thing (deleting the older one and writing a new one). Lines like the import statement and FocusScope { will be the same because there's no other way you can write this.

davidedmundson accepted this revision.Oct 10 2016, 1:13 PM
davidedmundson edited edge metadata.
sddm-theme/Background.qml
56

it might be better to have color as the default state (i.e no when clause)

that way a corrupt config will still render a black background.

This revision is now accepted and ready to land.Oct 10 2016, 1:13 PM
bgupta closed this revision.Oct 11 2016, 2:44 PM

Committed in rPLASMAWORKSPACEaafa20f19c87: sddm-theme: support configurable solid colour and image backgrounds.

FYI there has been a regression according to Rog131 commenting in this bug report.