refactor: split drawers

Split off interactions into new file
Also fix hover osd
This commit is contained in:
2 * r + 2 * t 2025-05-08 13:45:08 +10:00
parent ac2ef10d3f
commit 23482ac1f7
3 changed files with 15 additions and 9 deletions

View file

@ -8,8 +8,6 @@ import QtQuick.Effects
Item {
id: root
required property ShellScreen screen
anchors.fill: parent
StyledRect {
@ -43,10 +41,4 @@ Item {
maskThresholdMin: 0.5
maskSpreadAtMin: 1
}
MouseArea {
anchors.fill: parent
hoverEnabled: true
onPositionChanged: event => Drawers.setPosForScreen(root.screen, event.x, event.y)
}
}

View file

@ -38,12 +38,15 @@ Variants {
id: border
visible: false
screen: scope.modelData
}
LayerShadow {
source: border
}
Interactions {
screen: scope.modelData
}
}
}
}

View file

@ -0,0 +1,11 @@
import "root:/services"
import Quickshell
import QtQuick
MouseArea {
required property ShellScreen screen
anchors.fill: parent
hoverEnabled: true
onPositionChanged: event => Drawers.setPosForScreen(screen, event.x, event.y)
}