diff --git a/dots/.config/quickshell/ii/modules/common/Config.qml b/dots/.config/quickshell/ii/modules/common/Config.qml index da8ad85d8..0bca2b820 100644 --- a/dots/.config/quickshell/ii/modules/common/Config.qml +++ b/dots/.config/quickshell/ii/modules/common/Config.qml @@ -425,10 +425,11 @@ Singleton { property bool bottom: false property bool valueScroll: true property bool clickless: false - property real cornerRegionWidth: 250 - property real cornerRegionHeight: 2 + property int cornerRegionWidth: 250 + property int cornerRegionHeight: 5 property bool visualize: false property bool clicklessCornerEnd: true + property int clicklessCornerVerticalOffset: 1 } property JsonObject quickToggles: JsonObject { diff --git a/dots/.config/quickshell/ii/modules/screenCorners/ScreenCorners.qml b/dots/.config/quickshell/ii/modules/screenCorners/ScreenCorners.qml index 55173b664..cbb8087ae 100644 --- a/dots/.config/quickshell/ii/modules/screenCorners/ScreenCorners.qml +++ b/dots/.config/quickshell/ii/modules/screenCorners/ScreenCorners.qml @@ -79,10 +79,12 @@ Scope { implicitWidth: Config.options.sidebar.cornerOpen.cornerRegionWidth implicitHeight: Config.options.sidebar.cornerOpen.cornerRegionHeight hoverEnabled: true - onMouseXChanged: { + onPositionChanged: { if (!Config.options.sidebar.cornerOpen.clicklessCornerEnd) return; - if ((cornerWidget.isRight && mouseArea.mouseX >= mouseArea.width - 2) - || (cornerWidget.isLeft && mouseArea.mouseX <= 2)) + const verticalOffset = Config.options.sidebar.cornerOpen.clicklessCornerVerticalOffset; + const correctX = (cornerWidget.isRight && mouseArea.mouseX >= mouseArea.width - 2) || (cornerWidget.isLeft && mouseArea.mouseX <= 2); + const correctY = (cornerWidget.isTop && mouseArea.mouseY > verticalOffset || cornerWidget.isBottom && mouseArea.mouseY < mouseArea.height - verticalOffset); + if (correctX && correctY) screenCorners.actionForCorner[cornerPanelWindow.corner](); } onEntered: { diff --git a/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index bd08cfffd..662cfd389 100644 --- a/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -787,22 +787,22 @@ ContentPage { } } } + ConfigSwitch { + buttonIcon: "highlight_mouse_cursor" + text: Translation.tr("Hover to trigger") + checked: Config.options.sidebar.cornerOpen.clickless + onCheckedChanged: { + Config.options.sidebar.cornerOpen.clickless = checked; + } + + StyledToolTip { + text: Translation.tr("When this is off you'll have to click") + } + } Row { - ConfigSwitch { - buttonIcon: "highlight_mouse_cursor" - text: Translation.tr("Hover to trigger") - checked: Config.options.sidebar.cornerOpen.clickless - onCheckedChanged: { - Config.options.sidebar.cornerOpen.clickless = checked; - } - - StyledToolTip { - text: Translation.tr("When this is off you'll have to click") - } - } ConfigSwitch { enabled: !Config.options.sidebar.cornerOpen.clickless - text: Translation.tr("but force at absolute corner") + text: Translation.tr("Force hover open at absolute corner") checked: Config.options.sidebar.cornerOpen.clicklessCornerEnd onCheckedChanged: { Config.options.sidebar.cornerOpen.clicklessCornerEnd = checked; @@ -812,7 +812,29 @@ ContentPage { text: Translation.tr("When the previous option is off and this is on,\nyou can still hover the corner's end to open sidebar,\nand the remaining area can be used for volume/brightness scroll") } } + ConfigSpinBox { + icon: "arrow_cool_down" + text: Translation.tr("with vertical offset") + value: Config.options.sidebar.cornerOpen.clicklessCornerVerticalOffset + from: 0 + to: 20 + stepSize: 1 + onValueChanged: { + Config.options.sidebar.cornerOpen.clicklessCornerVerticalOffset = value; + } + MouseArea { + id: mouseArea + anchors.fill: parent + hoverEnabled: true + acceptedButtons: Qt.NoButton + StyledToolTip { + extraVisibleCondition: mouseArea.containsMouse + text: Translation.tr("Why this is cool:\nFor non-0 values, it won't trigger when you reach the\nscreen corner along the horizontal edge, but it will when\nyou do along the vertical edge") + } + } + } } + ConfigRow { uniform: true ConfigSwitch {