Dock: Slightly more compact

This commit is contained in:
LemmyCook 2025-09-11 22:46:19 -04:00
parent 626b745ce3
commit f5ac42c692

View file

@ -32,8 +32,6 @@ Variants {
screen: modelData screen: modelData
WlrLayershell.namespace: "noctalia-dock"
WlrLayershell.exclusionMode: Settings.data.dock.exclusive ? ExclusionMode.Auto : ExclusionMode.Ignore
readonly property bool autoHide: Settings.data.dock.autoHide readonly property bool autoHide: Settings.data.dock.autoHide
readonly property int hideDelay: 500 readonly property int hideDelay: 500
@ -50,7 +48,7 @@ Variants {
|| (Settings.data.bar.monitors.length === 0)) : false || (Settings.data.bar.monitors.length === 0)) : false
readonly property bool barAtBottom: hasBar && Settings.data.bar.position === "bottom" readonly property bool barAtBottom: hasBar && Settings.data.bar.position === "bottom"
readonly property bool barAtTop: hasBar && Settings.data.bar.position === "top" readonly property bool barAtTop: hasBar && Settings.data.bar.position === "top"
readonly property int barHeight: (barAtBottom || barAtTop) ? (Settings.data.bar.height || 30) * scaling : 0 readonly property int barHeight: (barAtBottom || barAtTop) ? Settings.data.bar.height * scaling : 0
readonly property int dockSpacing: 8 * scaling // Space between dock and bar/edge readonly property int dockSpacing: 8 * scaling // Space between dock and bar/edge
// Track hover state // Track hover state
@ -60,14 +58,12 @@ Variants {
// Dock is positioned at the bottom // Dock is positioned at the bottom
anchors.bottom: true anchors.bottom: true
// Dock should be above bar but not create its own exclusion zone
exclusionMode: ExclusionMode.Ignore
focusable: false focusable: false
// Make the window transparent
color: Color.transparent color: Color.transparent
WlrLayershell.namespace: "noctalia-dock"
WlrLayershell.exclusionMode: Settings.data.dock.exclusive ? ExclusionMode.Auto : ExclusionMode.Ignore
// Set the window size - include extra height only if bar is at bottom // Set the window size - include extra height only if bar is at bottom
implicitWidth: dockContainer.width + (floatingMargin * 2) implicitWidth: dockContainer.width + (floatingMargin * 2)
implicitHeight: fullHeight + floatingMargin + (barAtBottom ? barHeight + dockSpacing : 0) implicitHeight: fullHeight + floatingMargin + (barAtBottom ? barHeight + dockSpacing : 0)
@ -135,8 +131,8 @@ Variants {
Rectangle { Rectangle {
id: dockContainer id: dockContainer
width: dockLayout.implicitWidth + Style.marginL * scaling * 2 width: dockLayout.implicitWidth + Style.marginM * scaling * 2
height: Math.round(iconSize * 1.6) height: Math.round(iconSize * 1.5)
color: Qt.alpha(Color.mSurface, Settings.data.dock.backgroundOpacity) color: Qt.alpha(Color.mSurface, Settings.data.dock.backgroundOpacity)
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
@ -203,7 +199,7 @@ Variants {
RowLayout { RowLayout {
id: dockLayout id: dockLayout
spacing: Style.marginL * scaling spacing: Style.marginM * scaling
Layout.preferredHeight: parent.height Layout.preferredHeight: parent.height
anchors.centerIn: parent anchors.centerIn: parent
@ -229,7 +225,6 @@ Variants {
visible: false visible: false
} }
// The icon with better quality settings
Image { Image {
id: appIcon id: appIcon
width: iconSize width: iconSize
@ -323,7 +318,6 @@ Variants {
radius: Style.radiusXS * scaling radius: Style.radiusXS * scaling
anchors.top: parent.bottom anchors.top: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: Style.marginXXS * 1.5 * scaling
// Pulse animation for active indicator // Pulse animation for active indicator
SequentialAnimation on opacity { SequentialAnimation on opacity {