forked from Shinonome/dots-hyprland
hefty: bar: ws: bouncy special ws
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
pragma ComponentBehavior: Bound
|
||||||
|
import QtQuick
|
||||||
|
|
||||||
|
// MouseArea that contains good defaults for buttons
|
||||||
|
MouseArea {
|
||||||
|
id: root
|
||||||
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
}
|
||||||
@@ -39,9 +39,9 @@ Item {
|
|||||||
implicitWidth: vertical ? Appearance.sizes.verticalBarWidth : occupiedIndicators.implicitWidth
|
implicitWidth: vertical ? Appearance.sizes.verticalBarWidth : occupiedIndicators.implicitWidth
|
||||||
implicitHeight: vertical ? occupiedIndicators.implicitHeight : Appearance.sizes.barHeight
|
implicitHeight: vertical ? occupiedIndicators.implicitHeight : Appearance.sizes.barHeight
|
||||||
|
|
||||||
property real specialBlur: wsModel.specialWorkspaceActive ? 1 : 0
|
property real specialBlur: (wsModel.specialWorkspaceActive && !interactionMouseArea.containsMouse) ? 1 : 0
|
||||||
Behavior on specialBlur {
|
Behavior on specialBlur {
|
||||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
animation: Appearance.animation.elementMoveSmall.numberAnimation.createObject(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
@@ -133,7 +133,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/////////////////// Hover ///////////////////
|
/////////////////// Hover ///////////////////
|
||||||
MouseArea {
|
ButtonMouseArea {
|
||||||
id: interactionMouseArea
|
id: interactionMouseArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
@@ -268,13 +268,10 @@ Item {
|
|||||||
|
|
||||||
FadeLoader {
|
FadeLoader {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
shown: wsModel.specialWorkspaceActive
|
shown: wsModel.specialWorkspaceActive && root.specialBlur > 0
|
||||||
|
|
||||||
scale: 0.8 + 0.2 * root.specialBlur
|
scale: 0.8 + 0.2 * root.specialBlur
|
||||||
// layer.enabled: true
|
|
||||||
// layer.smooth: true
|
|
||||||
|
|
||||||
Pill {
|
sourceComponent: Pill {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
property real undirectionalWidth: root.activeWorkspaceSize
|
property real undirectionalWidth: root.activeWorkspaceSize
|
||||||
property real undirectionalLength: {
|
property real undirectionalLength: {
|
||||||
|
|||||||
Reference in New Issue
Block a user