summaryrefslogtreecommitdiff
path: root/modules/osd
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-11 23:55:05 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-11 23:55:05 +1000
commit60858f6f02fb7dc04e727db89090e7b83399803a (patch)
tree0a6300271786a38a468ba4bb6df0c392eed82043 /modules/osd
parentosd: fix show on hover (diff)
downloadcaelestia-shell-60858f6f02fb7dc04e727db89090e7b83399803a.tar.gz
caelestia-shell-60858f6f02fb7dc04e727db89090e7b83399803a.tar.bz2
caelestia-shell-60858f6f02fb7dc04e727db89090e7b83399803a.zip
feat: session menu
Diffstat (limited to 'modules/osd')
-rw-r--r--modules/osd/Content.qml1
-rw-r--r--modules/osd/Osd.qml71
2 files changed, 41 insertions, 31 deletions
diff --git a/modules/osd/Content.qml b/modules/osd/Content.qml
index 25ba7b8..6814966 100644
--- a/modules/osd/Content.qml
+++ b/modules/osd/Content.qml
@@ -1,7 +1,6 @@
import "root:/widgets"
import "root:/services"
import "root:/config"
-import Quickshell
import QtQuick
Column {
diff --git a/modules/osd/Osd.qml b/modules/osd/Osd.qml
index 8f93ae9..7774bab 100644
--- a/modules/osd/Osd.qml
+++ b/modules/osd/Osd.qml
@@ -80,49 +80,60 @@ Variants {
Component.onCompleted: root.winHeight = height
- Background {
- id: bg
-
- visible: false
-
+ Item {
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
+ anchors.rightMargin: Drawers.rightExclusion
- wrapperWidth: Math.min(wrapper.width, content.width)
- wrapperHeight: wrapper.height
- }
+ clip: true
+ visible: width > 0
+ implicitWidth: wrapper.width
+ implicitHeight: wrapper.height
- LayerShadow {
- source: bg
- }
+ Background {
+ id: bg
- Wrapper {
- id: wrapper
+ visible: false
- anchors.verticalCenter: parent.verticalCenter
- anchors.right: parent.right
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.right: parent.right
- implicitHeight: content.height + bg.rounding * 2
+ wrapperWidth: Math.min(wrapper.width, content.width)
+ wrapperHeight: wrapper.height
+ }
- osdVisible: root.osdVisible
- contentWidth: content.width
+ LayerShadow {
+ source: bg
+ }
+
+ Wrapper {
+ id: wrapper
+
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.right: parent.right
- Content {
- id: content
+ implicitHeight: content.height + bg.rounding * 2
- monitor: root.monitor
+ osdVisible: root.osdVisible
+ contentWidth: content.width
+
+ Content {
+ id: content
+
+ monitor: root.monitor
+ }
}
- }
- HoverHandler {
- id: hoverHandler
+ HoverHandler {
+ id: hoverHandler
- onHoveredChanged: {
- root.hovered = hovered;
- if (hovered)
- timer.stop();
- else
- root.osdVisible = false;
+ onHoveredChanged: {
+ root.hovered = hovered;
+ if (hovered)
+ timer.stop();
+ else
+ root.osdVisible = false;
+ }
}
}
}