forked from Shinonome/dots-hyprland
hefty: toplayer: fade out on locking
This commit is contained in:
@@ -2,9 +2,10 @@ import QtQuick
|
|||||||
import Qt5Compat.GraphicalEffects
|
import Qt5Compat.GraphicalEffects
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Wayland
|
import Quickshell.Wayland
|
||||||
|
import qs
|
||||||
|
import qs.services
|
||||||
import qs.modules.common
|
import qs.modules.common
|
||||||
import qs.modules.common.widgets
|
import qs.modules.common.widgets
|
||||||
import qs.services
|
|
||||||
import "../../common"
|
import "../../common"
|
||||||
import "../../common/widgets/shapes" as S
|
import "../../common/widgets/shapes" as S
|
||||||
import "../../common/widgets/shapes/material-shapes.js" as MaterialShapes
|
import "../../common/widgets/shapes/material-shapes.js" as MaterialShapes
|
||||||
@@ -20,6 +21,10 @@ PanelWindow {
|
|||||||
id: root
|
id: root
|
||||||
|
|
||||||
///////////////// Window //////////////////
|
///////////////// Window //////////////////
|
||||||
|
property real opacity: 1 * (GlobalStates.barOpen && !GlobalStates.screenLocked)
|
||||||
|
Behavior on opacity {
|
||||||
|
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||||
|
}
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
WlrLayershell.namespace: "quickshell:topLayerPanel"
|
WlrLayershell.namespace: "quickshell:topLayerPanel"
|
||||||
exclusionMode: ExclusionMode.Ignore
|
exclusionMode: ExclusionMode.Ignore
|
||||||
@@ -72,6 +77,7 @@ PanelWindow {
|
|||||||
easing.bezierCurve: Appearance.animationCurves.expressiveDefaultSpatial
|
easing.bezierCurve: Appearance.animationCurves.expressiveDefaultSpatial
|
||||||
}
|
}
|
||||||
color: Appearance.colors.colLayer0
|
color: Appearance.colors.colLayer0
|
||||||
|
opacity: root.opacity
|
||||||
borderWidth: (root.currentPanel === bar && Config.options.bar.cornerStyle !== 1) ? 0 : 1
|
borderWidth: (root.currentPanel === bar && Config.options.bar.cornerStyle !== 1) ? 0 : 1
|
||||||
borderColor: Appearance.colors.colLayer0Border
|
borderColor: Appearance.colors.colLayer0Border
|
||||||
visible: false // cuz there's already the shadow
|
visible: false // cuz there's already the shadow
|
||||||
@@ -79,6 +85,7 @@ PanelWindow {
|
|||||||
}
|
}
|
||||||
DropShadow {
|
DropShadow {
|
||||||
id: shadow
|
id: shadow
|
||||||
|
opacity: root.opacity
|
||||||
source: backgroundShape
|
source: backgroundShape
|
||||||
anchors.fill: backgroundShape
|
anchors.fill: backgroundShape
|
||||||
radius: 10
|
radius: 10
|
||||||
@@ -134,12 +141,14 @@ PanelWindow {
|
|||||||
|
|
||||||
HBar {
|
HBar {
|
||||||
id: bar
|
id: bar
|
||||||
|
opacity: root.opacity
|
||||||
load: root.currentPanel === this && root.finishedMorphing // the extra condition is to prevent workspace widget from acting up when switching horizontal/vertical... should be fixed later
|
load: root.currentPanel === this && root.finishedMorphing // the extra condition is to prevent workspace widget from acting up when switching horizontal/vertical... should be fixed later
|
||||||
shown: root.finishedMorphing
|
shown: root.finishedMorphing
|
||||||
}
|
}
|
||||||
|
|
||||||
// HOverview {
|
// HOverview {
|
||||||
// id: overview
|
// id: overview
|
||||||
|
// opacity: root.opacity
|
||||||
// load: root.currentPanel === this
|
// load: root.currentPanel === this
|
||||||
// shown: root.finishedMorphing
|
// shown: root.finishedMorphing
|
||||||
// onRequestFocus: root.currentPanel = overview
|
// onRequestFocus: root.currentPanel = overview
|
||||||
|
|||||||
Reference in New Issue
Block a user