forked from Shinonome/dots-hyprland
overlay: make widgets resizable
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user