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 D27695
ngraham |
VDG | |
Plasma |
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 D27695
No Linters Available |
No Unit Test Coverage |
Buildable 23555 | |
Build 23573: arc lint + arc unit |
.+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:
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.
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 :-/
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.
Can you submit the patch that adds widgets/toparea so I can play around with this here?
applets/systemtray/package/contents/ui/ExpandedRepresentation.qml | ||
---|---|---|
47 | not in all places you will have access to a dialog. the magic correct values should come from the toparea margins itself done to go well with the correspoding background svg. in the end, i would like to have this in a control... i kinda hope a standard toolBar control (will need some special casing when that style is running in plasma or an app in plasma mobile |
applets/systemtray/package/contents/ui/ExpandedRepresentation.qml | ||
---|---|---|
47 | I've done the first part (the magic correct values should come from the toparea margins). Regarding the control, I'm not sure how it could be done, since the usage of the toparea element changes a lot:
How could that be done? |
Ok - I think I got it. I will try to create a generic PlasmaComponents.TopArea element and use it here.
applets/systemtray/package/contents/ui/ExpandedRepresentation.qml | ||
---|---|---|
47 | Okay, I tried to create a new component for this on https://phabricator.kde.org/D27695. I did not use toolBar because it was already using a different svg, but if you think that's the best idea, I can investigate that |
applets/systemtray/package/contents/ui/ExpandedRepresentation.qml | ||
---|---|---|
43–64 | merge conflict remnant |
remove unrelated change
The title being moved to the right is a pre-existing feature/bug caused by some code in the system tray. Nice work!
Just noticed that there are various system tray applets whose main content/toolbar areas need a bit more of a top margin now:
It looks like this is not a universal thing and so will need to be fixed applet-by-applet. Could you submit patches for those?
Weird. I can't reproduce, neither in my compiled nor stable install: