misc qs updates
This commit is contained in:
parent
ee9bb5b3fc
commit
3c91610d5a
9 changed files with 60 additions and 147 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Wayland
|
||||
import ".."
|
||||
import "../lock" as Lock
|
||||
|
|
@ -15,41 +16,58 @@ PanelWindow {
|
|||
bottom: true
|
||||
}
|
||||
|
||||
width: 70
|
||||
exclusiveZone: width - margins.left
|
||||
property real baseWidth: 55
|
||||
property real leftMargin: root.compactState * 10
|
||||
width: baseWidth + 15
|
||||
exclusiveZone: baseWidth + (isFullscreenWorkspace ? 0 : 15) - margins.left
|
||||
|
||||
mask: Region {
|
||||
height: root.height
|
||||
width: root.exclusiveZone
|
||||
}
|
||||
|
||||
color: "transparent"
|
||||
|
||||
WlrLayershell.namespace: "shell:bar"
|
||||
|
||||
readonly property var tooltip: tooltip;
|
||||
readonly property Tooltip tooltip: tooltip;
|
||||
Tooltip {
|
||||
id: tooltip
|
||||
bar: root
|
||||
}
|
||||
|
||||
readonly property real tooltipXOffset: root.width + 2;
|
||||
readonly property real tooltipXOffset: root.baseWidth + root.leftMargin + 5;
|
||||
|
||||
function boundedY(targetY: real, height: real): real {
|
||||
return Math.max(barRect.anchors.topMargin + height, Math.min(barRect.height + barRect.anchors.topMargin - height, targetY))
|
||||
}
|
||||
|
||||
readonly property bool isFullscreenWorkspace: Hyprland.monitorFor(screen).activeWorkspace.hasFullscreen
|
||||
property real compactState: isFullscreenWorkspace ? 0 : 1
|
||||
Behavior on compactState {
|
||||
NumberAnimation {
|
||||
duration: 600
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: [0.0, 0.75, 0.15, 1.0, 1.0, 1.0]
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: barRect
|
||||
|
||||
x: 10 - Lock.Controller.lockSlide * (barRect.width + 10)
|
||||
x: root.leftMargin - Lock.Controller.lockSlide * (barRect.width + root.leftMargin)
|
||||
width: parent.width - 15
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
margins: 10
|
||||
margins: root.compactState * 10
|
||||
}
|
||||
|
||||
color: ShellGlobals.colors.bar
|
||||
radius: 5
|
||||
radius: root.compactState * 5
|
||||
border.color: ShellGlobals.colors.barOutline
|
||||
border.width: 1
|
||||
border.width: root.compactState
|
||||
|
||||
Item {
|
||||
id: containment
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue