[Kickoff] Theme separators
ClosedPublic

Authored by filipf on Jan 23 2020, 11:30 AM.

Details

Summary

Kickoff's separators were drawn as rectangles which doesn't allow them to be themed.

We have the infrastructure to theme lines though so this patch makes use of it.

The benefit is that themes can now gracefully incorporate separators into their design.

Test Plan

Tested with Oxygen.

Before:

After:

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
filipf created this revision.Jan 23 2020, 11:30 AM
Restricted Application added a project: Plasma. · View Herald TranscriptJan 23 2020, 11:30 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
filipf requested review of this revision.Jan 23 2020, 11:30 AM
filipf edited the test plan for this revision. (Show Details)Jan 23 2020, 11:32 AM
filipf added reviewers: Plasma, VDG.
filipf added inline comments.
applets/kickoff/package/contents/ui/FullRepresentation.qml
127

maybe this doesn't need to be specified anymore? (and everywhere else in the diff)

filipf updated this revision to Diff 74221.Jan 23 2020, 11:53 AM

use the element's own dimensions for geometry instead of hardcoding

filipf marked an inline comment as done.Jan 23 2020, 11:54 AM
filipf edited the test plan for this revision. (Show Details)Jan 23 2020, 11:57 AM
davidedmundson accepted this revision.Jan 23 2020, 1:33 PM
This revision is now accepted and ready to land.Jan 23 2020, 1:33 PM

When using the Breeze style, the blue selection line no longer touches the separator line:

When using the Breeze style, the blue selection line no longer touches the separator line:

Unfortunately not, yeah. It happens with all themes and is due to the changes in the height/width. The thing is if I leave the old height/width values the lines get rendered more dimly than they should so they need to be using the SVG's element size.

Now as for why this element size generates padding, I'm not sure. I could look into PlasmaCore.Svg and PlasmaCore.SvgItem source files.

filipf added a subscriber: ndavis.Jan 23 2020, 2:55 PM

Might actually be a lot simpler. It seems our line SVG file adds 1px of padding on each side:

@ndavis do you think it's alright to remove this padding?

ngraham accepted this revision.Jan 23 2020, 2:57 PM

Makes sense now. Let's land this and then fix the separator in another patch.

Can I land it on the 5.18 branch as well?

No objection.

This revision was automatically updated to reflect the committed changes.