Commit 695fec4a authored by Nate Graham's avatar Nate Graham 🔩

[applets/systemtray] Fix expanded representation's internal margins

This is a pre-existing problem, but became much more visible with D27189 (thus exposing
one of the reasons why I like visually separating dissimilar elements so much).
Essentially the dialog's bottom and right margins were not being properly mirrored on
the top and left, leading to the applet's content view looking off-center. Various apps
were locally adding their own extra top margins to compensate for this, which can be
removed once this patch lands.

This patch fixes that by explicitly using the default dialog margins for those edges.

I will submit follow-up patches to fix applets that were adding extra padding that is
now unnecessary.

Test Plan:
It was especially noticeable with D27160.

Before: {F8180273}

After: {F8180272}

Reviewers: #vdg, #plasma, cblack

Reviewed By: #vdg, #plasma, cblack

Subscribers: cblack, plasma-devel

Tags: #plasma

Differential Revision:
parent f4195688
......@@ -139,8 +139,12 @@ ColumnLayout {
visible: activeApplet
Layout.fillWidth: true
Layout.fillHeight: true
Layout.leftMargin: hiddenItemsView.visible && activeApplet && !LayoutMirroring.enabled ? units.largeSpacing : 0
Layout.rightMargin: hiddenItemsView.visible && activeApplet && LayoutMirroring.enabled ? units.largeSpacing : 0
// We need to add our own margins on the top and left (when the
// hidden items view is visible, at least) so it matches the
// dialog's own margins and content is centered correctly
Layout.leftMargin: hiddenItemsView.visible && activeApplet && !LayoutMirroring.enabled ? dialog.margins.left : 0
Layout.rightMargin: hiddenItemsView.visible && activeApplet && LayoutMirroring.enabled ? dialog.margins.right : 0
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment