summaryrefslogtreecommitdiff
path: root/modules/osd
diff options
context:
space:
mode:
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;
+ }
}
}
}