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
@@ -84,20 +84,26 @@ Singleton {
property JsonObject crosshair: JsonObject {
property bool pinned: false
property bool clickthrough: true
property real x: 835
property real y: 483
property real x: 827
property real y: 441
property real width: 250
property real height: 100
}
property JsonObject recorder: JsonObject {
property bool pinned: false
property bool clickthrough: false
property real x: 80
property real y: 80
property real width: 350
property real height: 130
}
property JsonObject resources: JsonObject {
property bool pinned: false
property bool clickthrough: true
property real x: 1500
property real y: 770
property real width: 350
property real height: 200
property int tabIndex: 0
}
property JsonObject volumeMixer: JsonObject {
@@ -105,6 +111,8 @@ Singleton {
property bool clickthrough: false
property real x: 80
property real y: 280
property real width: 350
property real height: 600
property int tabIndex: 0
}
property JsonObject fpsLimiter: JsonObject {
@@ -112,6 +120,8 @@ Singleton {
property bool clickthrough: false
property real x: 1576
property real y: 630
property real width: 280
property real height: 80
}
}
@@ -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)
}
}