From f181bdf21cdfdd5c06ba2282c38bd3ada228af5b Mon Sep 17 00:00:00 2001 From: art0rz Date: Fri, 21 Nov 2025 15:52:29 +0100 Subject: [PATCH] Add screen recording loading feedback --- Modules/Bar/Widgets/ScreenRecorder.qml | 31 +++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/Modules/Bar/Widgets/ScreenRecorder.qml b/Modules/Bar/Widgets/ScreenRecorder.qml index 3bcacc82..4c24a871 100644 --- a/Modules/Bar/Widgets/ScreenRecorder.qml +++ b/Modules/Bar/Widgets/ScreenRecorder.qml @@ -1,3 +1,4 @@ +import QtQuick import Quickshell import qs.Commons import qs.Services.Media @@ -11,7 +12,7 @@ NIconButton { property ShellScreen screen - icon: "camera-video" + icon: ScreenRecorderService.isPending ? "" : "camera-video" tooltipText: ScreenRecorderService.isRecording ? I18n.tr("tooltips.click-to-stop-recording") : I18n.tr("tooltips.click-to-start-recording") tooltipDirection: BarService.getTooltipDirection() density: Settings.data.bar.density @@ -31,4 +32,32 @@ NIconButton { } onClicked: handleClick() + + // Custom spinner shown only during pending start + NIcon { + id: pendingSpinner + icon: "loader-2" + visible: ScreenRecorderService.isPending + pointSize: { + switch (root.density) { + case "compact": + return Math.max(1, root.width * 0.65); + default: + return Math.max(1, root.width * 0.48); + } + } + applyUiScale: root.applyUiScale + color: root.enabled && root.hovering ? colorFgHover : colorFg + anchors.centerIn: parent + transformOrigin: Item.Center + + RotationAnimation on rotation { + running: ScreenRecorderService.isPending + from: 0 + to: 360 + duration: Style.animationSlow + loops: Animation.Infinite + onStopped: pendingSpinner.rotation = 0 + } + } }