[kcm/kwinrules] Fix placeholder message in RulesEditor
Summary: Fix the anchoring of the placeholder message after https://phabricator.kde.org/R108:9e5498238f88ece28f4f0d22da00879280cb7955 It needs to center on the free space, not the whole ListView. Test Plan Before: {F8323417} After: {F8323416} Reviewers: ngraham, broulik, #vdg, #plasma Reviewed By: ngraham, #vdg Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D29783
This commit is contained in:
parent
d7687ce277
commit
973957127d
1 changed files with 9 additions and 1 deletions
|
@ -48,7 +48,15 @@ ScrollViewKCM {
|
|||
Kirigami.PlaceholderMessage {
|
||||
id: hintArea
|
||||
visible: rulesView.count <= 4
|
||||
anchors.centerIn: parent
|
||||
anchors {
|
||||
// We need to center on the free space below contentItem, not the full ListView.
|
||||
// Setting both top and bottom anchors (or using anchors.fill) stretches the component
|
||||
// and distorts the spacing between its internal items.
|
||||
// This is fine as long as we have a single item here.
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
top: parent.contentItem.bottom
|
||||
bottom: parent.bottom
|
||||
}
|
||||
width: parent.width - (units.largeSpacing * 4)
|
||||
helpfulAction: QQC2.Action {
|
||||
text: i18n("Add Properties...")
|
||||
|
|
Loading…
Reference in a new issue