Commit fcdfc86d authored by Nate Graham's avatar Nate Graham 🔩

[sidebar view] Re-position defaults indicators

Previously, they were always the right-most item in their list items,
and could cause the arrow to move around. Now they're left of the arrow
so nothing moves around. The indicators still line up vertically.

BUG: 427935
FIXED-IN: 5.21
parent f946d9da
......@@ -25,18 +25,6 @@ RowLayout {
elide: Text.ElideRight
}
Kirigami.Icon {
Layout.alignment: Qt.AlignVCenter
Layout.preferredHeight: Kirigami.Units.iconSizes.small
// This is to vertically align the defaults indicators when visible
Layout.rightMargin: systemsettings.defaultsIndicatorsVisible && !defaultIndicator.visible ? defaultIndicator.implicitWidth + layout.spacing : 0
opacity: 0.7
Layout.preferredWidth: Layout.preferredHeight
source: (LayoutMirroring.enabled ? "go-next-symbolic-rtl" : "go-next-symbolic")
visible: layout.showArrow
selected: layout.selected
}
Rectangle {
id: defaultIndicator
radius: width * 0.5
......@@ -46,4 +34,21 @@ RowLayout {
Kirigami.Theme.colorSet: Kirigami.Theme.View
color: Kirigami.Theme.neutralTextColor
}
// Extra space to make the defaults indicators line up vertically for all items
Item {
visible: defaultIndicator.visible && !arrow.visible
implicitWidth: arrow.Layout.preferredWidth
}
Kirigami.Icon {
id: arrow
Layout.alignment: Qt.AlignVCenter
Layout.preferredHeight: Kirigami.Units.iconSizes.small
opacity: 0.7
Layout.preferredWidth: Layout.preferredHeight
source: (LayoutMirroring.enabled ? "go-next-symbolic-rtl" : "go-next-symbolic")
visible: layout.showArrow
selected: layout.selected
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment