From 76a8e644e0b5a3a5a348b53ca417cc3fdada3e46 Mon Sep 17 00:00:00 2001 From: Lemmy Date: Tue, 2 Sep 2025 12:10:35 -0400 Subject: [PATCH 1/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 21473a3..8112ef7 100644 --- a/README.md +++ b/README.md @@ -214,7 +214,7 @@ Alternatively, you can add it to your NixOS configuration or flake: | Select new random wallpaper | `qs -c noctalia-shell ipc call wallpaper random` | | Toggle Dark Mode | `qs -c noctalia-shell ipc call darkMode toggle` | | Set Dark Mode | `qs -c noctalia-shell ipc call darkMode setDark` | -| Set Light Mode | `qs -c noctalia-shell ipc call darkMode setLight` | +| Set Light Mode | `qs -c noctalia-shell ipc call darkMode setLight` | *If using the Flake installation on NixOS, replace `qs -c noctalia-shell` by `noctalia-shell`* From 26dc143b1d7f8209fb62dc6712dac8e7ad12134c Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Tue, 2 Sep 2025 13:06:10 -0400 Subject: [PATCH 2/3] Dock: allow clicking outside of the dock on the left and right side --- Modules/Dock/Dock.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/Dock/Dock.qml b/Modules/Dock/Dock.qml index 6003c2f..c1f9462 100644 --- a/Modules/Dock/Dock.qml +++ b/Modules/Dock/Dock.qml @@ -51,8 +51,8 @@ Variants { exclusionMode: ExclusionMode.Ignore anchors.bottom: true - anchors.left: true - anchors.right: true + implicitWidth: dockContainer.width + focusable: false color: Color.transparent implicitHeight: iconSize * 1.4 * scaling From d79011355ccc0179dd6c3468f5c8cbc83ffdc8c8 Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Tue, 2 Sep 2025 13:35:24 -0400 Subject: [PATCH 3/3] Dock: Fixed dock autohide when bar is at the bottom. --- Modules/Dock/Dock.qml | 106 ++++++++++++++++++++++++++++-------------- 1 file changed, 70 insertions(+), 36 deletions(-) diff --git a/Modules/Dock/Dock.qml b/Modules/Dock/Dock.qml index c1f9462..e10cc7d 100644 --- a/Modules/Dock/Dock.qml +++ b/Modules/Dock/Dock.qml @@ -32,30 +32,41 @@ Variants { screen: modelData - // Auto-hide properties - make reactive to settings changes - property bool autoHide: Settings.data.dock.autoHide || (Settings.data.bar.position === "bottom") + property bool autoHide: Settings.data.dock.autoHide property bool hidden: autoHide property int hideDelay: 500 property int showDelay: 100 property int hideAnimationDuration: Style.animationFast property int showAnimationDuration: Style.animationFast - property int peekHeight: 2 + property int peekHeight: 7 * scaling property int fullHeight: dockContainer.height property int iconSize: 36 + // Bar positioning properties + property bool barAtBottom: Settings.data.bar.position === "bottom" + property int barHeight: barAtBottom ? (Settings.data.bar.height || 30) * scaling : 0 + property int dockSpacing: 4 * scaling // Space between dock and bar + // Track hover state property bool dockHovered: false property bool anyAppHovered: false - // Dock is only shown if explicitely toggled - exclusionMode: ExclusionMode.Ignore - + // Dock is positioned at the bottom anchors.bottom: true - implicitWidth: dockContainer.width + // Dock should be above bar but not create its own exclusion zone + exclusionMode: ExclusionMode.Ignore focusable: false + + // Make the window transparent color: Color.transparent - implicitHeight: iconSize * 1.4 * scaling + + // Set the window size - always include space for peek area when auto-hide is enabled + implicitWidth: dockContainer.width + implicitHeight: fullHeight + (barAtBottom ? barHeight + dockSpacing : 0) + + // Position the entire window above the bar when bar is at bottom + margins.bottom: barAtBottom ? barHeight : 0 // Watch for autoHide setting changes onAutoHideChanged: { @@ -75,7 +86,7 @@ Variants { id: hideTimer interval: hideDelay onTriggered: { - if (autoHide && !dockHovered && !anyAppHovered) { + if (autoHide && !dockHovered && !anyAppHovered && !peekArea.containsMouse) { hidden = true } } @@ -85,40 +96,36 @@ Variants { Timer { id: showTimer interval: showDelay - onTriggered: hidden = false - } - - // Behavior for smooth hide/show animations - Behavior on margins.bottom { - NumberAnimation { - duration: hidden ? hideAnimationDuration : showAnimationDuration - easing.type: Easing.InOutQuad + onTriggered: { + if (autoHide) { + hidden = false + } } } + // Peek area that remains visible when dock is hidden MouseArea { - id: screenEdgeMouseArea - x: 0 - y: modelData && modelData.geometry ? modelData.geometry.height - (fullHeight + 10 * scaling) : 0 - width: screen.width - height: fullHeight + 10 * scaling - hoverEnabled: true - propagateComposedEvents: true + id: peekArea + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.right: parent.right + height: peekHeight + dockSpacing + hoverEnabled: autoHide + visible: autoHide onEntered: { if (autoHide && hidden) { showTimer.start() } } + onExited: { if (autoHide && !hidden && !dockHovered && !anyAppHovered) { - hideTimer.start() + hideTimer.restart() } } } - margins.bottom: hidden ? -(fullHeight - peekHeight) : 0 - Rectangle { id: dockContainer width: dock.width + 48 * scaling @@ -126,28 +133,53 @@ Variants { color: Color.mSurface anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom + anchors.bottomMargin: dockSpacing topLeftRadius: Style.radiusL * scaling topRightRadius: Style.radiusL * scaling + // Animate the dock sliding up and down + transform: Translate { + y: hidden ? (fullHeight - peekHeight) : 0 + + Behavior on y { + NumberAnimation { + duration: hidden ? hideAnimationDuration : showAnimationDuration + easing.type: Easing.InOutQuad + } + } + } + + // Drop shadow for better visibility when bar is transparent + layer.enabled: true + layer.effect: MultiEffect { + shadowEnabled: true + shadowColor: Qt.rgba(0, 0, 0, 0.3) + shadowBlur: 0.5 + shadowVerticalOffset: 2 + shadowHorizontalOffset: 0 + } + MouseArea { id: dockMouseArea anchors.fill: parent hoverEnabled: true - propagateComposedEvents: true onEntered: { dockHovered = true if (autoHide) { showTimer.stop() hideTimer.stop() - hidden = false + if (hidden) { + hidden = false + } } } + onExited: { dockHovered = false - // Only start hide timer if we're not hovering over any app - if (autoHide && !anyAppHovered) { - hideTimer.start() + // Only start hide timer if we're not hovering over any app or the peek area + if (autoHide && !anyAppHovered && !peekArea.containsMouse) { + hideTimer.restart() } } } @@ -265,16 +297,18 @@ Variants { if (autoHide) { showTimer.stop() hideTimer.stop() - hidden = false + if (hidden) { + hidden = false + } } } onExited: { anyAppHovered = false appTooltip.hide() - // Only start hide timer if we're not hovering over the dock - if (autoHide && !dockHovered) { - hideTimer.start() + // Only start hide timer if we're not hovering over the dock or peek area + if (autoHide && !dockHovered && !peekArea.containsMouse) { + hideTimer.restart() } }