diff --git a/quickshell/Modules/DankBar/Widgets/AppsDockOverflowButton.qml b/quickshell/Modules/DankBar/Widgets/AppsDockOverflowButton.qml index 7aceb1a98..fbcd4df22 100644 --- a/quickshell/Modules/DankBar/Widgets/AppsDockOverflowButton.qml +++ b/quickshell/Modules/DankBar/Widgets/AppsDockOverflowButton.qml @@ -68,7 +68,10 @@ Item { MouseArea { id: mouseArea - anchors.fill: parent + x: -root.leftMargin + y: -root.topMargin + width: root.width + root.leftMargin + root.rightMargin + height: root.height + root.topMargin + root.bottomMargin hoverEnabled: true cursorShape: Qt.PointingHandCursor onClicked: root.clicked() diff --git a/quickshell/Modules/DankBar/Widgets/ClipboardButton.qml b/quickshell/Modules/DankBar/Widgets/ClipboardButton.qml index 7de97fcfd..5790f5ac6 100644 --- a/quickshell/Modules/DankBar/Widgets/ClipboardButton.qml +++ b/quickshell/Modules/DankBar/Widgets/ClipboardButton.qml @@ -60,7 +60,10 @@ BasePill { } MouseArea { - anchors.fill: parent + x: -root.leftMargin + y: -root.topMargin + width: root.width + root.leftMargin + root.rightMargin + height: root.height + root.topMargin + root.bottomMargin acceptedButtons: Qt.LeftButton | Qt.RightButton cursorShape: Qt.PointingHandCursor onPressed: function (mouse) { diff --git a/quickshell/Modules/DankBar/Widgets/ColorPicker.qml b/quickshell/Modules/DankBar/Widgets/ColorPicker.qml index d3330cdef..55586a0d4 100644 --- a/quickshell/Modules/DankBar/Widgets/ColorPicker.qml +++ b/quickshell/Modules/DankBar/Widgets/ColorPicker.qml @@ -27,7 +27,10 @@ BasePill { MouseArea { z: 1 - anchors.fill: parent + x: -root.leftMargin + y: -root.topMargin + width: root.width + root.leftMargin + root.rightMargin + height: root.height + root.topMargin + root.bottomMargin cursorShape: Qt.PointingHandCursor onPressed: mouse => { root.triggerRipple(this, mouse.x, mouse.y); diff --git a/quickshell/Modules/DankBar/Widgets/CpuMonitor.qml b/quickshell/Modules/DankBar/Widgets/CpuMonitor.qml index 028b9a707..e85bcbd8b 100644 --- a/quickshell/Modules/DankBar/Widgets/CpuMonitor.qml +++ b/quickshell/Modules/DankBar/Widgets/CpuMonitor.qml @@ -111,7 +111,10 @@ BasePill { } MouseArea { - anchors.fill: parent + x: -root.leftMargin + y: -root.topMargin + width: root.width + root.leftMargin + root.rightMargin + height: root.height + root.topMargin + root.bottomMargin cursorShape: Qt.PointingHandCursor acceptedButtons: Qt.LeftButton onPressed: mouse => { diff --git a/quickshell/Modules/DankBar/Widgets/CpuTemperature.qml b/quickshell/Modules/DankBar/Widgets/CpuTemperature.qml index f336362a5..c4d81dfa9 100644 --- a/quickshell/Modules/DankBar/Widgets/CpuTemperature.qml +++ b/quickshell/Modules/DankBar/Widgets/CpuTemperature.qml @@ -111,7 +111,10 @@ BasePill { } MouseArea { - anchors.fill: parent + x: -root.leftMargin + y: -root.topMargin + width: root.width + root.leftMargin + root.rightMargin + height: root.height + root.topMargin + root.bottomMargin cursorShape: Qt.PointingHandCursor acceptedButtons: Qt.LeftButton onPressed: mouse => { diff --git a/quickshell/Modules/DankBar/Widgets/DiskUsage.qml b/quickshell/Modules/DankBar/Widgets/DiskUsage.qml index ac2e2ae49..4e4376075 100644 --- a/quickshell/Modules/DankBar/Widgets/DiskUsage.qml +++ b/quickshell/Modules/DankBar/Widgets/DiskUsage.qml @@ -270,7 +270,10 @@ BasePill { MouseArea { id: mouseArea z: 1 - anchors.fill: parent + x: -root.leftMargin + y: -root.topMargin + width: root.width + root.leftMargin + root.rightMargin + height: root.height + root.topMargin + root.bottomMargin hoverEnabled: root.isVerticalOrientation onEntered: { if (root.isVerticalOrientation && root.selectedMount) { diff --git a/quickshell/Modules/DankBar/Widgets/FocusedApp.qml b/quickshell/Modules/DankBar/Widgets/FocusedApp.qml index cd0a989cd..79d6fe1d5 100644 --- a/quickshell/Modules/DankBar/Widgets/FocusedApp.qml +++ b/quickshell/Modules/DankBar/Widgets/FocusedApp.qml @@ -379,7 +379,10 @@ BasePill { MouseArea { id: mouseArea - anchors.fill: parent + x: -root.leftMargin + y: -root.topMargin + width: root.width + root.leftMargin + root.rightMargin + height: root.height + root.topMargin + root.bottomMargin hoverEnabled: root.isVerticalOrientation cursorShape: Qt.PointingHandCursor onEntered: { diff --git a/quickshell/Modules/DankBar/Widgets/GpuTemperature.qml b/quickshell/Modules/DankBar/Widgets/GpuTemperature.qml index ae28ca17e..79f7c93e4 100644 --- a/quickshell/Modules/DankBar/Widgets/GpuTemperature.qml +++ b/quickshell/Modules/DankBar/Widgets/GpuTemperature.qml @@ -179,7 +179,10 @@ BasePill { } MouseArea { - anchors.fill: parent + x: -root.leftMargin + y: -root.topMargin + width: root.width + root.leftMargin + root.rightMargin + height: root.height + root.topMargin + root.bottomMargin cursorShape: Qt.PointingHandCursor acceptedButtons: Qt.LeftButton onPressed: mouse => { diff --git a/quickshell/Modules/DankBar/Widgets/IdleInhibitor.qml b/quickshell/Modules/DankBar/Widgets/IdleInhibitor.qml index 41126c90a..47c9753ef 100644 --- a/quickshell/Modules/DankBar/Widgets/IdleInhibitor.qml +++ b/quickshell/Modules/DankBar/Widgets/IdleInhibitor.qml @@ -27,7 +27,10 @@ BasePill { MouseArea { z: 1 - anchors.fill: parent + x: -root.leftMargin + y: -root.topMargin + width: root.width + root.leftMargin + root.rightMargin + height: root.height + root.topMargin + root.bottomMargin cursorShape: Qt.PointingHandCursor onPressed: mouse => { root.triggerRipple(this, mouse.x, mouse.y); diff --git a/quickshell/Modules/DankBar/Widgets/KeyboardLayoutName.qml b/quickshell/Modules/DankBar/Widgets/KeyboardLayoutName.qml index 6590e0199..b763f489f 100644 --- a/quickshell/Modules/DankBar/Widgets/KeyboardLayoutName.qml +++ b/quickshell/Modules/DankBar/Widgets/KeyboardLayoutName.qml @@ -99,7 +99,10 @@ BasePill { MouseArea { z: 1 - anchors.fill: parent + x: -root.leftMargin + y: -root.topMargin + width: root.width + root.leftMargin + root.rightMargin + height: root.height + root.topMargin + root.bottomMargin cursorShape: Qt.PointingHandCursor onPressed: mouse => { root.triggerRipple(this, mouse.x, mouse.y); diff --git a/quickshell/Modules/DankBar/Widgets/NotepadButton.qml b/quickshell/Modules/DankBar/Widgets/NotepadButton.qml index bb0648194..46c3ca921 100644 --- a/quickshell/Modules/DankBar/Widgets/NotepadButton.qml +++ b/quickshell/Modules/DankBar/Widgets/NotepadButton.qml @@ -143,7 +143,10 @@ BasePill { } MouseArea { - anchors.fill: parent + x: -root.leftMargin + y: -root.topMargin + width: root.width + root.leftMargin + root.rightMargin + height: root.height + root.topMargin + root.bottomMargin acceptedButtons: Qt.LeftButton | Qt.RightButton onPressed: mouse => { root.triggerRipple(this, mouse.x, mouse.y); diff --git a/quickshell/Modules/DankBar/Widgets/NotificationCenterButton.qml b/quickshell/Modules/DankBar/Widgets/NotificationCenterButton.qml index cf1c4c002..a7a41d1b9 100644 --- a/quickshell/Modules/DankBar/Widgets/NotificationCenterButton.qml +++ b/quickshell/Modules/DankBar/Widgets/NotificationCenterButton.qml @@ -65,7 +65,10 @@ BasePill { } MouseArea { - anchors.fill: parent + x: -root.leftMargin + y: -root.topMargin + width: root.width + root.leftMargin + root.rightMargin + height: root.height + root.topMargin + root.bottomMargin acceptedButtons: Qt.MiddleButton cursorShape: Qt.PointingHandCursor onPressed: mouse => { diff --git a/quickshell/Modules/DankBar/Widgets/RamMonitor.qml b/quickshell/Modules/DankBar/Widgets/RamMonitor.qml index ed530fed7..8f14c2287 100644 --- a/quickshell/Modules/DankBar/Widgets/RamMonitor.qml +++ b/quickshell/Modules/DankBar/Widgets/RamMonitor.qml @@ -146,7 +146,10 @@ BasePill { } MouseArea { - anchors.fill: parent + x: -root.leftMargin + y: -root.topMargin + width: root.width + root.leftMargin + root.rightMargin + height: root.height + root.topMargin + root.bottomMargin cursorShape: Qt.PointingHandCursor acceptedButtons: Qt.LeftButton onPressed: mouse => { diff --git a/quickshell/Modules/DankBar/Widgets/RunningApps.qml b/quickshell/Modules/DankBar/Widgets/RunningApps.qml index c874ee375..92e0fc91d 100644 --- a/quickshell/Modules/DankBar/Widgets/RunningApps.qml +++ b/quickshell/Modules/DankBar/Widgets/RunningApps.qml @@ -397,7 +397,10 @@ BasePill { MouseArea { id: mouseArea - anchors.fill: parent + y: root.isVerticalOrientation ? 0 : -root.topMargin + x: root.isVerticalOrientation ? -root.leftMargin : 0 + width: parent.width + (root.isVerticalOrientation ? root.leftMargin + root.rightMargin : 0) + height: parent.height + (root.isVerticalOrientation ? 0 : root.topMargin + root.bottomMargin) hoverEnabled: true cursorShape: Qt.PointingHandCursor acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton @@ -651,7 +654,10 @@ BasePill { MouseArea { id: mouseArea - anchors.fill: parent + y: root.isVerticalOrientation ? 0 : -root.topMargin + x: root.isVerticalOrientation ? -root.leftMargin : 0 + width: parent.width + (root.isVerticalOrientation ? root.leftMargin + root.rightMargin : 0) + height: parent.height + (root.isVerticalOrientation ? 0 : root.topMargin + root.bottomMargin) hoverEnabled: true cursorShape: Qt.PointingHandCursor acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton diff --git a/quickshell/Modules/DankBar/Widgets/SystemTrayBar.qml b/quickshell/Modules/DankBar/Widgets/SystemTrayBar.qml index 04e669ab5..fb86d8b27 100644 --- a/quickshell/Modules/DankBar/Widgets/SystemTrayBar.qml +++ b/quickshell/Modules/DankBar/Widgets/SystemTrayBar.qml @@ -570,7 +570,10 @@ BasePill { MouseArea { id: trayItemArea - anchors.fill: parent + y: root.isVerticalOrientation ? 0 : -root.topMargin + x: root.isVerticalOrientation ? -root.leftMargin : 0 + width: parent.width + (root.isVerticalOrientation ? root.leftMargin + root.rightMargin : 0) + height: parent.height + (root.isVerticalOrientation ? 0 : root.topMargin + root.bottomMargin) hoverEnabled: true acceptedButtons: Qt.LeftButton | Qt.RightButton cursorShape: dragHandler.longPressing ? Qt.DragMoveCursor : Qt.PointingHandCursor @@ -777,7 +780,10 @@ BasePill { MouseArea { id: inlineTrayItemArea - anchors.fill: parent + y: root.isVerticalOrientation ? 0 : -root.topMargin + x: root.isVerticalOrientation ? -root.leftMargin : 0 + width: parent.width + (root.isVerticalOrientation ? root.leftMargin + root.rightMargin : 0) + height: parent.height + (root.isVerticalOrientation ? 0 : root.topMargin + root.bottomMargin) hoverEnabled: true acceptedButtons: Qt.LeftButton | Qt.RightButton cursorShape: Qt.PointingHandCursor @@ -896,7 +902,10 @@ BasePill { MouseArea { id: trayItemArea - anchors.fill: parent + y: root.isVerticalOrientation ? 0 : -root.topMargin + x: root.isVerticalOrientation ? -root.leftMargin : 0 + width: parent.width + (root.isVerticalOrientation ? root.leftMargin + root.rightMargin : 0) + height: parent.height + (root.isVerticalOrientation ? 0 : root.topMargin + root.bottomMargin) hoverEnabled: true acceptedButtons: Qt.LeftButton | Qt.RightButton cursorShape: dragHandler.longPressing ? Qt.DragMoveCursor : Qt.PointingHandCursor diff --git a/quickshell/Modules/DankBar/Widgets/SystemUpdate.qml b/quickshell/Modules/DankBar/Widgets/SystemUpdate.qml index d6c8e7817..2027b07cb 100644 --- a/quickshell/Modules/DankBar/Widgets/SystemUpdate.qml +++ b/quickshell/Modules/DankBar/Widgets/SystemUpdate.qml @@ -158,7 +158,10 @@ BasePill { MouseArea { z: 1 - anchors.fill: parent + x: -root.leftMargin + y: -root.topMargin + width: root.width + root.leftMargin + root.rightMargin + height: root.height + root.topMargin + root.bottomMargin cursorShape: Qt.PointingHandCursor onPressed: mouse => { root.triggerRipple(this, mouse.x, mouse.y); diff --git a/quickshell/Modules/DankBar/Widgets/Vpn.qml b/quickshell/Modules/DankBar/Widgets/Vpn.qml index 79a0a4f76..56e4a10da 100644 --- a/quickshell/Modules/DankBar/Widgets/Vpn.qml +++ b/quickshell/Modules/DankBar/Widgets/Vpn.qml @@ -65,7 +65,10 @@ BasePill { MouseArea { id: clickArea - anchors.fill: parent + x: -root.leftMargin + y: -root.topMargin + width: root.width + root.leftMargin + root.rightMargin + height: root.height + root.topMargin + root.bottomMargin hoverEnabled: true cursorShape: DMSNetworkService.isBusy ? Qt.BusyCursor : Qt.PointingHandCursor acceptedButtons: Qt.LeftButton | Qt.RightButton diff --git a/quickshell/Modules/DankBar/Widgets/WorkspaceSwitcher.qml b/quickshell/Modules/DankBar/Widgets/WorkspaceSwitcher.qml index 0abf9cbd8..8307c24ad 100644 --- a/quickshell/Modules/DankBar/Widgets/WorkspaceSwitcher.qml +++ b/quickshell/Modules/DankBar/Widgets/WorkspaceSwitcher.qml @@ -21,6 +21,7 @@ Item { property var blurBarWindow: null property var hyprlandOverviewLoader: null property var parentScreen: null + property real crossEdgeExtension: 0 readonly property bool isMango: CompositorService.isMango @@ -45,7 +46,7 @@ Item { } readonly property real _topMargin: { if (!isVertical) - return 0; + return axis?.edge === "top" ? crossEdgeExtension : 0; root.y; if (!root.parent) return 0; @@ -54,7 +55,7 @@ Item { } readonly property real _bottomMargin: { if (!isVertical) - return 0; + return axis?.edge === "bottom" ? crossEdgeExtension : 0; root.y; root.height; if (!root.parent || !blurBarWindow) diff --git a/quickshell/Modules/DankIsland/DankIslandHostWindow.qml b/quickshell/Modules/DankIsland/DankIslandHostWindow.qml index 12ab32161..3a50f715d 100644 --- a/quickshell/Modules/DankIsland/DankIslandHostWindow.qml +++ b/quickshell/Modules/DankIsland/DankIslandHostWindow.qml @@ -26,7 +26,7 @@ PanelWindow { function containsGlobalPoint(gx, gy, padding) { const pad = padding !== undefined ? padding : 16; - const items = [surface.inputMaskItem, surface.mediaDropdownMaskItem, satelliteHost.leftInputItem, satelliteHost.rightInputItem]; + const items = [surface.inputMaskItem, surface.fittsStripItem, surface.mediaDropdownMaskItem, satelliteHost.leftInputItem, satelliteHost.rightInputItem]; for (let i = 0; i < items.length; i++) { const item = items[i]; if (!item || item.width <= 0 || item.height <= 0) @@ -126,6 +126,10 @@ PanelWindow { item: controller.inputSuspended ? null : surface.inputMaskItem } + Region { + item: controller.inputSuspended ? null : surface.fittsStripItem + } + Region { item: controller.inputSuspended ? null : satelliteHost.leftInputItem } @@ -319,6 +323,11 @@ PanelWindow { intersection: Intersection.Subtract } + Region { + item: fittsStripHole + intersection: Intersection.Subtract + } + Region { item: leftSatelliteHole intersection: Intersection.Subtract @@ -352,6 +361,15 @@ PanelWindow { height: surface.inputMaskItem.height } + Item { + id: fittsStripHole + + x: surface.fittsStripItem.x + y: surface.fittsStripItem.y + root.hostOriginY + width: surface.fittsStripItem.visible ? surface.fittsStripItem.width : 0 + height: surface.fittsStripItem.visible ? surface.fittsStripItem.height : 0 + } + Item { id: leftSatelliteHole diff --git a/quickshell/Modules/DankIsland/DankIslandSurface.qml b/quickshell/Modules/DankIsland/DankIslandSurface.qml index 00630b700..f04e24a1f 100644 --- a/quickshell/Modules/DankIsland/DankIslandSurface.qml +++ b/quickshell/Modules/DankIsland/DankIslandSurface.qml @@ -52,6 +52,7 @@ Item { signal scrollWheel(var wheel) readonly property alias inputMaskItem: inputEnvelope + readonly property alias fittsStripItem: fittsStrip readonly property bool motionRunning: motion.running readonly property real springTimeConstantMs: motion.timeConstantMs property real trackedHeight: 0 @@ -281,7 +282,45 @@ Item { } HoverHandler { - onHoveredChanged: root.controller.updatePointerInside(hovered) + id: islandHover + + onHoveredChanged: root.updateFittsPointerInside() + } + } + + function updateFittsPointerInside() { + root.controller.updatePointerInside(islandHover.hovered || stripHover.hovered); + } + + // Fitts zone from the island edge to the screen edge — hover/click count as island. + // Bounds follow the spring target, never the per-frame value, so the Wayland mask is not + // rewritten every frame and the strip never shrinks out from under the cursor mid-open. + Item { + id: fittsStrip + + readonly property real spanWidth: Math.max(root.controller.compactTarget.width, motion.targetWidth) + readonly property real edgeGap: root.bottomEdge ? Math.max(0, root.height - (root.targetVisualY + motion.targetHeight)) : Math.max(0, root.targetVisualY) + + x: Math.round((root.width - spanWidth) / 2 + motion.targetOffsetX) + y: root.bottomEdge ? root.targetVisualY + motion.targetHeight : 0 + width: spanWidth + height: edgeGap + visible: edgeGap > 0 && spanWidth > 0 + + HoverHandler { + id: stripHover + + onHoveredChanged: root.updateFittsPointerInside() + } + + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.LeftButton + onClicked: root.controller.requestToggle(true) + onWheel: wheel => { + root.scrollWheel(wheel); + wheel.accepted = true; + } } } diff --git a/quickshell/Modules/Plugins/PluginComponent.qml b/quickshell/Modules/Plugins/PluginComponent.qml index 59667a2d6..3edfa183a 100644 --- a/quickshell/Modules/Plugins/PluginComponent.qml +++ b/quickshell/Modules/Plugins/PluginComponent.qml @@ -17,6 +17,14 @@ Item { property var blurBarWindow: null property string pluginId: "" property var pluginService: null + property bool isFirst: false + property bool isLast: false + property bool isLeftBarEdge: false + property bool isRightBarEdge: false + property bool isTopBarEdge: false + property bool isBottomBarEdge: false + property real sectionSpacing: 0 + property real crossEdgeExtension: 0 property string visibilityCommand: "" property int visibilityInterval: 0 @@ -191,6 +199,14 @@ Item { barConfig: root.barConfig blurBarWindow: root.blurBarWindow content: root.horizontalBarPill + isFirst: root.isFirst + isLast: root.isLast + isLeftBarEdge: root.isLeftBarEdge + isRightBarEdge: root.isRightBarEdge + isTopBarEdge: root.isTopBarEdge + isBottomBarEdge: root.isBottomBarEdge + sectionSpacing: root.sectionSpacing + crossEdgeExtension: root.crossEdgeExtension states: State { name: "hidden" @@ -252,6 +268,14 @@ Item { blurBarWindow: root.blurBarWindow content: root.verticalBarPill isVerticalOrientation: true + isFirst: root.isFirst + isLast: root.isLast + isLeftBarEdge: root.isLeftBarEdge + isRightBarEdge: root.isRightBarEdge + isTopBarEdge: root.isTopBarEdge + isBottomBarEdge: root.isBottomBarEdge + sectionSpacing: root.sectionSpacing + crossEdgeExtension: root.crossEdgeExtension states: State { name: "hidden"