overlay: make widgets resizable

This commit is contained in:
end-4
2025-11-08 23:50:21 +01:00
parent 241f33fb2f
commit 788c01c242
9 changed files with 134 additions and 32 deletions
@@ -12,7 +12,7 @@ import Quickshell.Widgets
* It doesn't exactly match the spec because it does not make sense to have stuff on a computer that fucking huge.
* Should be at 3/4 scale...
*/
Slider {
id: root
@@ -8,6 +8,8 @@ import qs.modules.common
MouseArea {
id: root
property alias animateXPos: xBehavior.enabled
property alias animateYPos: yBehavior.enabled
property bool draggable: true
drag.target: draggable ? root : undefined
cursorShape: (draggable && containsPress) ? Qt.ClosedHandCursor : draggable ? Qt.OpenHandCursor : Qt.ArrowCursor
@@ -18,9 +20,11 @@ MouseArea {
}
Behavior on x {
id: xBehavior
animation: Appearance.animation.elementMove.numberAnimation.createObject(this)
}
Behavior on y {
id: yBehavior
animation: Appearance.animation.elementMove.numberAnimation.createObject(this)
}
}