Created a top area based on widgets/toparea.svg
Needs RevisionPublic

Authored by niccolove on Thu, Feb 6, 11:11 AM.

Details

Reviewers
ngraham
Group Reviewers
VDG
Plasma
Maniphest Tasks
T10470: Improve the visuals of tray popups
Summary

This add a top area based on the current theme. If the file is not in the current theme, said area is not shown.

Problem: the header is moved to the right by the Svg element, and I'm not sure how to align it correctly anymore.

Depends on D27444

Test Plan

Diff Detail

Repository
R120 Plasma Workspace
Branch
topbar (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 22124
Build 22142: arc lint + arc unit
niccolove created this revision.Thu, Feb 6, 11:11 AM
Restricted Application added a project: Plasma. · View Herald TranscriptThu, Feb 6, 11:11 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
niccolove requested review of this revision.Thu, Feb 6, 11:11 AM
niccolove edited the summary of this revision. (Show Details)Thu, Feb 6, 11:12 AM
niccolove edited the test plan for this revision. (Show Details)
niccolove edited the summary of this revision. (Show Details)
niccolove added reviewers: VDG, Plasma.
ndavis added a subscriber: ndavis.Thu, Feb 6, 11:27 AM

.+1 to this idea. I noticed that the separator on the left is less dark. I'm not necessarily opposed to that, but is it intentional? Also, where is toparea.svg? I don't see it in breeze/widgets/

.+1 to this idea. I noticed that the separator on the left is less dark. I'm not necessarily opposed to that, but is it intentional? Also, where is toparea.svg? I don't see it in breeze/widgets/

The line color is accidental, I should fix that. The svg should be created (in a different patch, I thought?)
The one I'm currently using is:

... The svg should be created (in a different patch, I thought?)

I just realized this is plasma-workspace, not plasma-framework. My bad.

ngraham requested changes to this revision.Thu, Feb 6, 4:34 PM
ngraham added a subscriber: ngraham.

Yeah, so you'll want to submit a plasma-frameworks patch which includes the new SVG and mark this as depending on it.

The reason why the text is now pushed over is because you added the new PlasmaCore.FrameSvgItem *inside* the RowLayout that contains the Heading. If anything the reverse should be true; the RowLayout should be inside the new header SVG.

Also you can't set anchors on an item inside a Layout; it causes binding loops. Anchors are only for positioning items that are outside of Layouts. Items inside Layouts get positioned using properties like Layout.fillWidth, Layout.Alignment`, Layout.maximumWidth, and so on.

This revision now requires changes to proceed.Thu, Feb 6, 4:34 PM

Yeah, so you'll want to submit a plasma-frameworks patch which includes the new SVG and mark this as depending on it.

Okay

The reason why the text is now pushed over is because you added the new PlasmaCore.FrameSvgItem *inside* the RowLayout that contains the Heading. If anything the reverse should be true; the RowLayout should be inside the new header SVG.

That can't be done as far as I know - elements are not displayed correctly when inside. Or maybe it's because I should use Layouts better?

Also you can't set anchors on an item inside a Layout; it causes binding loops. Anchors are only for positioning items that are outside of Layouts. Items inside Layouts get positioned using properties like Layout.fillWidth, Layout.Alignment`, Layout.maximumWidth, and so on.

I'd do that, but as far as I know Layout does not support the negative margin I need to expand the area to the borders :-/

The reason why the text is now pushed over is because you added the new PlasmaCore.FrameSvgItem *inside* the RowLayout that contains the Heading. If anything the reverse should be true; the RowLayout should be inside the new header SVG.

That can't be done as far as I know - elements are not displayed correctly when inside. Or maybe it's because I should use Layouts better?

I think it should work if you make the FrameSvgItem an item inside the top-level ColumnLayout, make it fill the width, and make the RowLayout a chilt item of the svg with anchors.fill: parent.

Also you can't set anchors on an item inside a Layout; it causes binding loops. Anchors are only for positioning items that are outside of Layouts. Items inside Layouts get positioned using properties like Layout.fillWidth, Layout.Alignment`, Layout.maximumWidth, and so on.

I'd do that, but as far as I know Layout does not support the negative margin I need to expand the area to the borders :-/

Then you can set the negative margins on the top-level layout, and re-add them as needed for the child items that are below the header. Not ideal though.

I'm afraid I need help here, I can't figure out the layout.

Can you submit the patch that adds widgets/toparea so I can play around with this here?

niccolove edited the summary of this revision. (Show Details)Sun, Feb 16, 8:12 PM
niccolove added a dependency: D27444: Added top area.