diff --git a/Commons/Settings.qml b/Commons/Settings.qml index 9f51e4b..47561c7 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -140,6 +140,8 @@ Singleton { property bool dimDesktop: false property bool showScreenCorners: false property real radiusRatio: 1.0 + // Animation speed multiplier (0.1x - 2.0x) + property real animationSpeed: 1.0 // Replace sidepanel toggle with distro logo (shown in bar and/or side panel) property bool useDistroLogoForSidepanel: false } diff --git a/Commons/Style.qml b/Commons/Style.qml index ce743e2..d2af5a8 100644 --- a/Commons/Style.qml +++ b/Commons/Style.qml @@ -56,9 +56,9 @@ Singleton { property real opacityFull: 1.0 // Animation duration (ms) - property int animationFast: 150 - property int animationNormal: 300 - property int animationSlow: 450 + property int animationFast: Math.round(150 * Settings.data.general.animationSpeed) + property int animationNormal: Math.round(300 * Settings.data.general.animationSpeed) + property int animationSlow: Math.round(450 * Settings.data.general.animationSpeed) // Dimensions property int barHeight: 36 diff --git a/Modules/Bar/Widgets/ActiveWindow.qml b/Modules/Bar/Widgets/ActiveWindow.qml index 8e41fcc..9fa84da 100644 --- a/Modules/Bar/Widgets/ActiveWindow.qml +++ b/Modules/Bar/Widgets/ActiveWindow.qml @@ -12,36 +12,16 @@ Row { property ShellScreen screen property real scaling: ScalingService.scale(screen) + // Title stays collapsed by default; expands only on hover property bool showingFullTitle: false - property int lastWindowIndex: -1 anchors.verticalCenter: parent.verticalCenter spacing: Style.marginS * scaling visible: getTitle() !== "" - // Timer to hide full title after window switch - Timer { - id: fullTitleTimer - interval: 2000 - repeat: false - onTriggered: { - showingFullTitle = false - } - } - - // Update text when window changes - Connections { - target: CompositorService - function onActiveWindowChanged() { - // Check if window actually changed - if (CompositorService.focusedWindowIndex !== lastWindowIndex) { - lastWindowIndex = CompositorService.focusedWindowIndex - showingFullTitle = true - fullTitleTimer.restart() - } - } - } + // Remove auto-expand timer; we rely solely on hover + // No auto-expansion on window change; keep collapsed unless hovered function getTitle() { // Use the service's focusedWindowTitle property which is updated immediately // when WindowOpenedOrChanged events are received @@ -105,11 +85,10 @@ Row { NText { id: titleText - // If hovered or just switched window, show up to 400 pixels - // If not hovered show up to 150 pixels - width: (showingFullTitle || mouseArea.containsMouse) ? Math.min(fullTitleMetrics.contentWidth, - 400 * scaling) : Math.min( - fullTitleMetrics.contentWidth, 150 * scaling) + // Fix collapsed width to 150px to avoid layout shifts with neighbors + // Expand up to 400px on hover + width: mouseArea.containsMouse ? Math.min(fullTitleMetrics.contentWidth, 400 * scaling) : 150 * scaling + horizontalAlignment: mouseArea.containsMouse ? Text.AlignLeft : Text.AlignHCenter text: getTitle() font.pointSize: Style.fontSizeS * scaling font.weight: Style.fontWeightMedium diff --git a/Modules/Bar/Widgets/Workspace.qml b/Modules/Bar/Widgets/Workspace.qml index ab62ab2..3a75800 100644 --- a/Modules/Bar/Widgets/Workspace.qml +++ b/Modules/Bar/Widgets/Workspace.qml @@ -107,7 +107,7 @@ Item { property: "masterProgress" from: 0.0 to: 1.0 - duration: 1000 + duration: Style.animationSlow * 2 easing.type: Easing.OutQuint } PropertyAction { diff --git a/Modules/BluetoothPanel/BluetoothPanel.qml b/Modules/BluetoothPanel/BluetoothPanel.qml index e793196..3518d9b 100644 --- a/Modules/BluetoothPanel/BluetoothPanel.qml +++ b/Modules/BluetoothPanel/BluetoothPanel.qml @@ -346,7 +346,7 @@ NPanel { loops: Animation.Infinite from: 0 to: 360 - duration: 2000 + duration: Style.animationSlow * 4 } } diff --git a/Modules/SettingsPanel/Tabs/GeneralTab.qml b/Modules/SettingsPanel/Tabs/GeneralTab.qml index 5c80c31..c05adc8 100644 --- a/Modules/SettingsPanel/Tabs/GeneralTab.qml +++ b/Modules/SettingsPanel/Tabs/GeneralTab.qml @@ -164,6 +164,46 @@ ColumnLayout { Layout.bottomMargin: Style.marginL * scaling } + // Animation Speed + ColumnLayout { + spacing: Style.marginXXS * scaling + Layout.fillWidth: true + + NText { + text: "Animation Speed" + font.pointSize: Style.fontSizeL * scaling + font.weight: Style.fontWeightBold + color: Color.mOnSurface + } + + NText { + text: "Adjust global animation speed (0.1× to 2.0×)" + font.pointSize: Style.fontSizeXS * scaling + color: Color.mOnSurfaceVariant + wrapMode: Text.WordWrap + Layout.fillWidth: true + } + + RowLayout { + NSlider { + Layout.fillWidth: true + from: 0.1 + to: 2.0 + stepSize: 0.01 + value: Settings.data.general.animationSpeed + onMoved: Settings.data.general.animationSpeed = value + cutoutColor: Color.mSurface + } + + NText { + text: Math.round(Settings.data.general.animationSpeed * 100) + "%" + Layout.alignment: Qt.AlignVCenter + Layout.leftMargin: Style.marginS * scaling + color: Color.mOnSurface + } + } + } + NText { text: "Fonts" font.pointSize: Style.fontSizeXXL * scaling diff --git a/Widgets/NBusyIndicator.qml b/Widgets/NBusyIndicator.qml index 08fb097..67f104a 100644 --- a/Widgets/NBusyIndicator.qml +++ b/Widgets/NBusyIndicator.qml @@ -9,7 +9,7 @@ Item { property color color: Color.mPrimary property int size: Style.baseWidgetSize * scaling property int strokeWidth: Style.borderL * scaling - property int duration: 1000 + property int duration: Style.animationSlow * 2 implicitWidth: size implicitHeight: size