Commit 448a9e57 authored by Nate Graham's avatar Nate Graham
Browse files

Improve Sort menu button's behaviors to be more conventional

Now it looks checked when clicked, and closes when menu when clicked
again.
parent 6dc33833
Pipeline #123142 passed with stage
in 17 seconds
......@@ -60,11 +60,18 @@ Item {
id: sortMenuButton
Kirigami.Theme.colorSet: Kirigami.Settings.isMobile ? Kirigami.Theme.Complementary : Kirigami.Theme.Window
Kirigami.Theme.inherit: false
objectName: 'sortMenuButton'
display: AbstractButton.TextOnly
checkable: true
checked: sortMenu.visible
onClicked: {
sortMenu.sortOrder = navigationBar.sortOrder
sortMenu.popup(sortMenuButton, sortMenuButton.x, sortMenuButton.y + sortMenuButton.height)
if (sortMenu.visible) {
sortMenu.dismiss()
} else {
sortMenu.sortOrder = navigationBar.sortOrder
sortMenu.popup(sortMenuButton, sortMenuButton.x, sortMenuButton.y + sortMenuButton.height)
}
}
// Custom content item for now to replicate the look of a button
......
Supports Markdown
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