kcm/kwinrules: Fix header in properties list
This provides a better fix for the header positioning bug in the properties list sheet, instead of the previous workaround (which wasn't enough in some situations) Upstream bugfix (in the Kirigami component) is not advisable as it could cause unintended consequencies in other uses/apps See also: https://bugs.kde.org/show_bug.cgi?id=422289 BUG: 421583 FIXED-IN: 5.24
This commit is contained in:
parent
bd1fab3458
commit
d13c39bec6
1 changed files with 4 additions and 13 deletions
|
@ -173,7 +173,10 @@ ScrollViewKCM {
|
|||
|
||||
section {
|
||||
property: "section"
|
||||
delegate: Kirigami.ListSectionHeader { label: section }
|
||||
delegate: Kirigami.ListSectionHeader {
|
||||
label: section
|
||||
height: implicitHeight
|
||||
}
|
||||
}
|
||||
|
||||
delegate: Kirigami.AbstractListItem {
|
||||
|
@ -240,7 +243,6 @@ ScrollViewKCM {
|
|||
onSheetOpenChanged: {
|
||||
searchField.text = "";
|
||||
if (sheetOpen) {
|
||||
overlayModel.ready = true;
|
||||
searchField.forceActiveFocus();
|
||||
} else {
|
||||
overlayModel.onlySuggestions = false;
|
||||
|
@ -290,19 +292,8 @@ ScrollViewKCM {
|
|||
invalidateFilter();
|
||||
}
|
||||
|
||||
// Delay the model filtering until `ready` is set
|
||||
// FIXME: Workaround https://bugs.kde.org/show_bug.cgi?id=422289
|
||||
property bool ready: false
|
||||
onReadyChanged: {
|
||||
invalidateFilter();
|
||||
}
|
||||
|
||||
filterString: searchField.text.trim().toLowerCase()
|
||||
filterRowCallback: (source_row, source_parent) => {
|
||||
if (!ready) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var index = sourceModel.index(source_row, 0, source_parent);
|
||||
|
||||
var hasSuggestion = sourceModel.data(index, RulesModel.SuggestedValueRole) != null;
|
||||
|
|
Loading…
Reference in a new issue