refactor: split drawers
Split off interactions into new file Also fix hover osd
This commit is contained in:
parent
ac2ef10d3f
commit
23482ac1f7
3 changed files with 15 additions and 9 deletions
|
|
@ -8,8 +8,6 @@ import QtQuick.Effects
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property ShellScreen screen
|
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
StyledRect {
|
StyledRect {
|
||||||
|
|
@ -43,10 +41,4 @@ Item {
|
||||||
maskThresholdMin: 0.5
|
maskThresholdMin: 0.5
|
||||||
maskSpreadAtMin: 1
|
maskSpreadAtMin: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
hoverEnabled: true
|
|
||||||
onPositionChanged: event => Drawers.setPosForScreen(root.screen, event.x, event.y)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,12 +38,15 @@ Variants {
|
||||||
id: border
|
id: border
|
||||||
|
|
||||||
visible: false
|
visible: false
|
||||||
screen: scope.modelData
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LayerShadow {
|
LayerShadow {
|
||||||
source: border
|
source: border
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Interactions {
|
||||||
|
screen: scope.modelData
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
11
modules/drawers/Interactions.qml
Normal file
11
modules/drawers/Interactions.qml
Normal 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)
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue