diff --git a/applets/systemtray/package/contents/ui/ExpandedRepresentation.qml b/applets/systemtray/package/contents/ui/ExpandedRepresentation.qml
index 0d723d974..c19f2bea5 100644
--- a/applets/systemtray/package/contents/ui/ExpandedRepresentation.qml
+++ b/applets/systemtray/package/contents/ui/ExpandedRepresentation.qml
@@ -39,38 +39,12 @@ ColumnLayout {
property alias hiddenLayout: hiddenItemsView.layout
RowLayout {
+ Layout.fillWidth: true
PlasmaExtras.Heading {
id: heading
+ Layout.fillWidth: true
level: 1
- Layout.leftMargin: {
- //Menu mode
- if (!activeApplet && hiddenItemsView.visible && LayoutMirroring.enabled === false) {
- return units.smallSpacing;
-
- //applet open, sidebar
- } else if (activeApplet && hiddenItemsView.visible && LayoutMirroring.enabled === false) {
- return hiddenItemsView.width + units.largeSpacing;
-
- //applet open, no sidebar
- } else {
- return 0;
- }
- }
- Layout.rightMargin: {
- //Menu mode
- if (!activeApplet && hiddenItemsView.visible && LayoutMirroring.enabled === true) {
- return units.smallSpacing;
-
- //applet open, sidebar
- } else if (activeApplet && hiddenItemsView.visible && LayoutMirroring.enabled === true) {
- return hiddenItemsView.width + units.largeSpacing;
-
- //applet open, no sidebar
- } else {
- return 0;
- }
- }
visible: activeApplet
text: activeApplet ? activeApplet.title : ""
@@ -110,6 +84,7 @@ ColumnLayout {
}
RowLayout {
+ Layout.fillWidth: true
spacing: 0 // must be 0 so that the separator is as close to the indicator as possible
HiddenItemsView {