TrayMenu: fix dynamic scaling

This commit is contained in:
LemmyCook 2025-09-01 14:41:12 -04:00
parent 210bbac583
commit 87067f7062
2 changed files with 18 additions and 7 deletions

View file

@ -17,6 +17,14 @@ Rectangle {
property real scaling: 1.0
readonly property real itemSize: 24 * scaling
function onLoaded() {
// When the widget is fully initialized with its props
// set the screen for the trayMenu
if (trayMenu.item) {
trayMenu.item.screen = screen
}
}
visible: SystemTray.items.values.length > 0
implicitWidth: tray.width + Style.marginM * scaling * 2
implicitHeight: Math.round(Style.capsuleHeight * scaling)
@ -155,13 +163,7 @@ Rectangle {
Loader {
id: trayMenu
source: "../Extras/TrayMenu.qml"
onLoaded: {
if (item) {
item.screen = screen
}
}
source: "../Extras/TrayMenu.qml"
}
}
}