Visibility service for handling active popups

This commit is contained in:
Benjamin Palko 2025-07-31 11:47:46 -04:00
parent 89cf6f315b
commit 9873324823
4 changed files with 24 additions and 11 deletions

View file

@ -11,13 +11,8 @@ StyledButton {
id: root
property SystemTrayItem trayItem
property bool menuOpened: false
onClicked: toggleMenu()
function toggleMenu() {
menuOpened = !menuOpened;
}
onClicked: menu.toggle()
content: IconImage {
id: icon
@ -36,8 +31,6 @@ StyledButton {
Menu {
id: menu
opened: root.menuOpened
anchor.item: root
anchor.rect.x: root.width / 2 - width / 2
anchor.rect.y: root.height + 8