[kcmkwin/kwineffects] Collapse list item when clicking on it again
Currently, each effect's list items expands when you click on any non-interactive part of it, but it does not collapse when you click on it again. With this commit, now it does. BUG: 421883 FIXED-IN: 5.23
This commit is contained in:
parent
56915dc113
commit
bbf9c54dd8
1 changed files with 7 additions and 1 deletions
|
@ -17,7 +17,13 @@ Kirigami.SwipeListItem {
|
|||
id: listItem
|
||||
hoverEnabled: true
|
||||
onClicked: {
|
||||
view.currentIndex = index;
|
||||
if (view.currentIndex == index) {
|
||||
// Collapse list item
|
||||
view.currentIndex = -1;
|
||||
} else {
|
||||
// Expand list item
|
||||
view.currentIndex = index;
|
||||
}
|
||||
}
|
||||
contentItem: RowLayout {
|
||||
id: row
|
||||
|
|
Loading…
Reference in a new issue