From 8b10ec2cfb1ca7a435f4688431d0c2ab4beb8686 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Wed, 29 Oct 2025 11:04:00 +0100 Subject: [PATCH] sidebar: anime: fix loading indicator showing when navigating w/ keys --- .../cookieClock/dateIndicator/BubbleDate.qml | 7 ++++--- .../common/widgets/MaterialLoadingIndicator.qml | 5 ++--- .../quickshell/ii/modules/common/widgets/shapes | 2 +- .../quickshell/ii/modules/lock/PasswordChars.qml | 2 +- .../quickshell/ii/modules/sidebarLeft/Anime.qml | 16 +++++++++------- 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/BubbleDate.qml b/dots/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/BubbleDate.qml index 35659e4fc..3a7313600 100644 --- a/dots/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/BubbleDate.qml +++ b/dots/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/BubbleDate.qml @@ -13,13 +13,14 @@ Item { text: Qt.locale().toString(DateTime.clock.date, root.isMonth ? "MM" : "d") - MaterialCookie { + MaterialShape { + id: bubble z: 5 - sides: root.isMonth ? 1 : 4 + // sides: root.isMonth ? 1 : 4 + shape: root.isMonth ? MaterialShape.Shape.Pill : MaterialShape.Shape.Pentagon anchors.centerIn: parent color: root.isMonth ? Appearance.colors.colPrimaryContainer : Appearance.colors.colTertiaryContainer implicitSize: targetSize - constantlyRotate: Config.options.background.clock.cookie.constantlyRotate } StyledText { diff --git a/dots/.config/quickshell/ii/modules/common/widgets/MaterialLoadingIndicator.qml b/dots/.config/quickshell/ii/modules/common/widgets/MaterialLoadingIndicator.qml index e810ca2e1..502cd1a3f 100644 --- a/dots/.config/quickshell/ii/modules/common/widgets/MaterialLoadingIndicator.qml +++ b/dots/.config/quickshell/ii/modules/common/widgets/MaterialLoadingIndicator.qml @@ -16,8 +16,8 @@ Rectangle { implicitHeight: implicitSize radius: Math.min(width, height) / 2 color: Appearance.colors.colPrimaryContainer - property double baseShapeSize: root.implicitSize * 1.3 - property double leapZoomSize: root.baseShapeSize * 1.3 + property double baseShapeSize: root.implicitSize * 0.7 + property double leapZoomSize: root.baseShapeSize * 1.2 property double leapZoomProgress: 0 // Shape @@ -80,7 +80,6 @@ Rectangle { const leapZoomDiff = root.leapZoomSize - root.baseShapeSize const progressFirstHalf = Math.min(root.leapZoomProgress, 0.5) * 2; const progressSecondHalf = Math.max(root.leapZoomProgress - 0.5, 0) * 2; - print("progress", root.leapZoomProgress, "zoom", root.baseShapeSize + leapZoomDiff * progressFirstHalf - leapZoomDiff * progressSecondHalf) return root.baseShapeSize + leapZoomDiff * progressFirstHalf - leapZoomDiff * progressSecondHalf; } color: Appearance.colors.colOnPrimaryContainer diff --git a/dots/.config/quickshell/ii/modules/common/widgets/shapes b/dots/.config/quickshell/ii/modules/common/widgets/shapes index 3c4e4a374..2e9263e01 160000 --- a/dots/.config/quickshell/ii/modules/common/widgets/shapes +++ b/dots/.config/quickshell/ii/modules/common/widgets/shapes @@ -1 +1 @@ -Subproject commit 3c4e4a37451fc32c1755efd710d9e3a24b79986c +Subproject commit 2e9263e011e8dcf00a66da5a2e3fe4df160b41b9 diff --git a/dots/.config/quickshell/ii/modules/lock/PasswordChars.qml b/dots/.config/quickshell/ii/modules/lock/PasswordChars.qml index 058173000..79ffc9464 100644 --- a/dots/.config/quickshell/ii/modules/lock/PasswordChars.qml +++ b/dots/.config/quickshell/ii/modules/lock/PasswordChars.qml @@ -75,7 +75,7 @@ StyledFlickable { NumberAnimation { target: materialShape properties: "implicitSize" - to: 34 + to: 18 easing.type: Easing.BezierSpline easing.bezierCurve: Appearance.animationCurves.expressiveFastSpatial } diff --git a/dots/.config/quickshell/ii/modules/sidebarLeft/Anime.qml b/dots/.config/quickshell/ii/modules/sidebarLeft/Anime.qml index 1b101d42e..4b398311e 100644 --- a/dots/.config/quickshell/ii/modules/sidebarLeft/Anime.qml +++ b/dots/.config/quickshell/ii/modules/sidebarLeft/Anime.qml @@ -25,7 +25,7 @@ Item { property bool pullLoading: false property int pullLoadingGap: 80 - property real normalizedPullDistance: Math.max(0, (1 - Math.exp(-booruResponseListView.verticalOvershoot / 50))) + property real normalizedPullDistance: Math.max(0, (1 - Math.exp(-booruResponseListView.verticalOvershoot / 50)) * booruResponseListView.dragging) Connections { target: Booru @@ -96,10 +96,7 @@ Item { } } else if (inputText.trim() == "+") { - if (root.responses.length > 0) { - const lastResponse = root.responses[root.responses.length - 1] - root.handleInput(lastResponse.tags.join(" ") + ` ${parseInt(lastResponse.page) + 1}`); - } + root.handleInput(`${root.commandPrefix}next`); } else { // Create tag list @@ -126,13 +123,18 @@ Item { tagInputField.forceActiveFocus() if (event.modifiers === Qt.NoModifier) { if (event.key === Qt.Key_PageUp) { + if (booruResponseListView.atYBeginning) return; booruResponseListView.contentY = Math.max(0, booruResponseListView.contentY - booruResponseListView.height / 2) event.accepted = true } else if (event.key === Qt.Key_PageDown) { + if (booruResponseListView.atYEnd) return; booruResponseListView.contentY = Math.min(booruResponseListView.contentHeight - booruResponseListView.height / 2, booruResponseListView.contentY + booruResponseListView.height / 2) event.accepted = true } } + if ((event.modifiers & Qt.ControlModifier) && (event.modifiers & Qt.ShiftModifier) && event.key === Qt.Key_O) { + Booru.clearResponses() + } } @@ -217,7 +219,7 @@ Item { anchors { horizontalCenter: parent.horizontalCenter bottom: parent.bottom - bottomMargin: 20 + (root.pullLoading ? 0 : Math.max(0, (root.normalizedPullDistance - 0.5) * 36)) + bottomMargin: 20 + (root.pullLoading ? 0 : Math.max(0, (root.normalizedPullDistance - 0.5) * 50)) Behavior on bottomMargin { NumberAnimation { duration: 200 @@ -227,7 +229,7 @@ Item { } } loading: root.pullLoading || Booru.runningRequests > 0 - pullProgress: Math.min(1, booruResponseListView.verticalOvershoot / root.pullLoadingGap) + pullProgress: Math.min(1, booruResponseListView.verticalOvershoot / root.pullLoadingGap * booruResponseListView.dragging) scale: root.pullLoading ? 1 : Math.min(1, root.normalizedPullDistance * 2) } }