Commit 471554b7 authored by Ismael Asensio's avatar Ismael Asensio

[kcm/kwinrules] Fix layout misalignment of list items

Remove anchors within `Kirigami.AbstractListItem` delegates.
They were causing random misalignment of items in the main and the overlay `ListView`s

Test Plan:
Before {F8284332}
After {F8284333}

Reviewers: broulik, #vdg, #kwin, ngraham

Reviewed By: #vdg, ngraham

Subscribers: ahiemstra, ngraham, kwin

Tags: #kwin

Differential Revision:
parent 760765ed
......@@ -35,11 +35,6 @@ Kirigami.AbstractListItem {
hoverEnabled: false
RowLayout {
anchors {
left: parent.left
right: parent.right
margins: Kirigami.Units.smallSpacing
Kirigami.Icon {
id: itemIcon
......@@ -143,14 +143,10 @@ ScrollViewKCM {
width: ListView.view.width
RowLayout {
anchors.fill: parent
Kirigami.Icon {
source: model.icon
Layout.preferredHeight: Kirigami.Units.iconSizes.smallMedium
Layout.preferredWidth: Kirigami.Units.iconSizes.smallMedium
Layout.leftMargin: Kirigami.Units.largeSpacing
Layout.rightMargin: Kirigami.Units.largeSpacing
Layout.alignment: Qt.AlignVCenter
QQC2.Label {
......@@ -183,6 +179,8 @@ ScrollViewKCM {
opacity: propertyDelegate.hovered ? 1 : 0
onClicked: propertyDelegate.clicked()
Layout.preferredWidth: implicitWidth
Layout.leftMargin: -Kirigami.Units.smallSpacing
Layout.rightMargin: -Kirigami.Units.smallSpacing
Layout.alignment: Qt.AlignVCenter
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