From 532c3a83953520cc6397325e11d7a9f2426a7f88 Mon Sep 17 00:00:00 2001 From: Ly-sec Date: Fri, 8 Aug 2025 15:37:38 +0200 Subject: [PATCH] Disable scale slider for now --- Components/ThemedSlider.qml | 5 +- Widgets/SettingsWindow/Tabs/Display.qml | 68 ++++++++++++------------- 2 files changed, 35 insertions(+), 38 deletions(-) diff --git a/Components/ThemedSlider.qml b/Components/ThemedSlider.qml index e782019..4592dbf 100644 --- a/Components/ThemedSlider.qml +++ b/Components/ThemedSlider.qml @@ -3,7 +3,6 @@ import QtQuick.Controls import QtQuick.Effects import qs.Settings -// Reusable themed slider styled like the sliders in Wallpaper.qml Slider { id: slider @@ -13,9 +12,7 @@ Slider { readonly property real trackHeight: 12 * Theme.scale(screen) readonly property real knobDiameter: 28 * Theme.scale(screen) // Optional color to cut the track beneath the knob (should match surrounding background) - // If not provided, falls back to Theme.backgroundPrimary property var cutoutColor - // Extra radius for the cutout so it shows around the knob edges readonly property real cutoutExtra: 8 * Theme.scale(screen) snapMode: snapAlways ? Slider.SnapAlways : Slider.SnapOnRelease @@ -44,7 +41,7 @@ Slider { } } - // Circular cutout centered under the knob to create the "notch" on both sides + // Circular cutout Rectangle { id: knobCutout width: knobDiameter + cutoutExtra diff --git a/Widgets/SettingsWindow/Tabs/Display.qml b/Widgets/SettingsWindow/Tabs/Display.qml index 166b51f..b0be61d 100644 --- a/Widgets/SettingsWindow/Tabs/Display.qml +++ b/Widgets/SettingsWindow/Tabs/Display.qml @@ -419,40 +419,40 @@ ColumnLayout { } } - // Scale slider - ColumnLayout { - Layout.fillWidth: true - spacing: 4 * Theme.scale(screen) - Text { text: "Scale"; color: Theme.textSecondary; font.pixelSize: 10 * Theme.scale(screen) } - RowLayout { - Layout.fillWidth: true - spacing: 8 * Theme.scale(screen) - // Value read from settings override, default to Theme.scale(modelData) - property real currentValue: (Settings.settings.monitorScaleOverrides && Settings.settings.monitorScaleOverrides[monitorCard.monitorName] !== undefined) ? Settings.settings.monitorScaleOverrides[monitorCard.monitorName] : Theme.scale(modelData) - // Reusable slider component (exact style from Wallpaper.qml) - ThemedSlider { - id: scaleSlider - Layout.fillWidth: true - screen: modelData - cutoutColor: Theme.surface - from: 0.8 - to: 2.0 - stepSize: 0.05 - snapAlways: true - value: parent.currentValue - onMoved: { - if (isFinite(value)) { - let overrides = Settings.settings.monitorScaleOverrides || {}; - overrides = Object.assign({}, overrides); - overrides[monitorCard.monitorName] = value; - Settings.settings.monitorScaleOverrides = overrides; - parent.currentValue = value; - } - } - } - Text { text: parent.currentValue.toFixed(2); font.pixelSize: 12 * Theme.scale(screen); color: Theme.textPrimary; width: 36 } - } - } + // Scale slider (temporarily disabled) + // ColumnLayout { + // Layout.fillWidth: true + // spacing: 4 * Theme.scale(screen) + // Text { text: "Scale"; color: Theme.textSecondary; font.pixelSize: 10 * Theme.scale(screen) } + // RowLayout { + // Layout.fillWidth: true + // spacing: 8 * Theme.scale(screen) + // // Value read from settings override, default to Theme.scale(modelData) + // property real currentValue: (Settings.settings.monitorScaleOverrides && Settings.settings.monitorScaleOverrides[monitorCard.monitorName] !== undefined) ? Settings.settings.monitorScaleOverrides[monitorCard.monitorName] : Theme.scale(modelData) + // // Reusable slider component (exact style from Wallpaper.qml) + // ThemedSlider { + // id: scaleSlider + // Layout.fillWidth: true + // screen: modelData + // cutoutColor: Theme.surface + // from: 0.8 + // to: 2.0 + // stepSize: 0.05 + // snapAlways: true + // value: parent.currentValue + // onMoved: { + // if (isFinite(value)) { + // let overrides = Settings.settings.monitorScaleOverrides || {}; + // overrides = Object.assign({}, overrides); + // overrides[monitorCard.monitorName] = value; + // Settings.settings.monitorScaleOverrides = overrides; + // parent.currentValue = value; + // } + // } + // } + // Text { text: parent.currentValue.toFixed(2); font.pixelSize: 12 * Theme.scale(screen); color: Theme.textPrimary; width: 36 } + // } + // } } } }