wbar: tray

This commit is contained in:
end-4
2025-11-16 12:05:09 +01:00
parent c71a2498d0
commit 5b69995945
12 changed files with 264 additions and 40 deletions
@@ -13,12 +13,23 @@ Loader {
required property var contentItem
property real padding: Looks.radius.large - Looks.radius.medium
property bool noSmoothClosing: !Config.options.waffles.smootherAnimations
property bool closeOnFocusLost: true
signal focusCleared()
property Item anchorItem: parent
property real visualMargin: 12
readonly property bool barAtBottom: Config.options.waffles.bar.bottom
property real ambientShadowWidth: 1
onFocusCleared: {
if (!root.closeOnFocusLost) return;
root.close()
}
function grabFocus() { // Doesn't work
item.grabFocus();
}
function close() {
item.close();
}
@@ -43,9 +54,7 @@ Loader {
id: focusGrab
active: true
windows: [popupWindow]
onCleared: {
root.close()
}
onCleared: root.focusCleared();
}
function close() {
@@ -53,6 +62,10 @@ Loader {
else closeAnim.start();
}
function grabFocus() {
focusGrab.active = true; // Doesn't work
}
implicitWidth: realContent.implicitWidth + (ambientShadow.border.width * 2) + (root.visualMargin * 2)
implicitHeight: realContent.implicitHeight + (ambientShadow.border.width * 2) + (root.visualMargin * 2)