Disable scale slider for now

This commit is contained in:
Ly-sec 2025-08-08 15:37:38 +02:00
parent 084f5e68cf
commit 532c3a8395
2 changed files with 35 additions and 38 deletions

View file

@ -3,7 +3,6 @@ import QtQuick.Controls
import QtQuick.Effects import QtQuick.Effects
import qs.Settings import qs.Settings
// Reusable themed slider styled like the sliders in Wallpaper.qml
Slider { Slider {
id: slider id: slider
@ -13,9 +12,7 @@ Slider {
readonly property real trackHeight: 12 * Theme.scale(screen) readonly property real trackHeight: 12 * Theme.scale(screen)
readonly property real knobDiameter: 28 * Theme.scale(screen) readonly property real knobDiameter: 28 * Theme.scale(screen)
// Optional color to cut the track beneath the knob (should match surrounding background) // Optional color to cut the track beneath the knob (should match surrounding background)
// If not provided, falls back to Theme.backgroundPrimary
property var cutoutColor property var cutoutColor
// Extra radius for the cutout so it shows around the knob edges
readonly property real cutoutExtra: 8 * Theme.scale(screen) readonly property real cutoutExtra: 8 * Theme.scale(screen)
snapMode: snapAlways ? Slider.SnapAlways : Slider.SnapOnRelease 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 { Rectangle {
id: knobCutout id: knobCutout
width: knobDiameter + cutoutExtra width: knobDiameter + cutoutExtra

View file

@ -419,40 +419,40 @@ ColumnLayout {
} }
} }
// Scale slider // Scale slider (temporarily disabled)
ColumnLayout { // ColumnLayout {
Layout.fillWidth: true // Layout.fillWidth: true
spacing: 4 * Theme.scale(screen) // spacing: 4 * Theme.scale(screen)
Text { text: "Scale"; color: Theme.textSecondary; font.pixelSize: 10 * Theme.scale(screen) } // Text { text: "Scale"; color: Theme.textSecondary; font.pixelSize: 10 * Theme.scale(screen) }
RowLayout { // RowLayout {
Layout.fillWidth: true // Layout.fillWidth: true
spacing: 8 * Theme.scale(screen) // spacing: 8 * Theme.scale(screen)
// Value read from settings override, default to Theme.scale(modelData) // // 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) // 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) // // Reusable slider component (exact style from Wallpaper.qml)
ThemedSlider { // ThemedSlider {
id: scaleSlider // id: scaleSlider
Layout.fillWidth: true // Layout.fillWidth: true
screen: modelData // screen: modelData
cutoutColor: Theme.surface // cutoutColor: Theme.surface
from: 0.8 // from: 0.8
to: 2.0 // to: 2.0
stepSize: 0.05 // stepSize: 0.05
snapAlways: true // snapAlways: true
value: parent.currentValue // value: parent.currentValue
onMoved: { // onMoved: {
if (isFinite(value)) { // if (isFinite(value)) {
let overrides = Settings.settings.monitorScaleOverrides || {}; // let overrides = Settings.settings.monitorScaleOverrides || {};
overrides = Object.assign({}, overrides); // overrides = Object.assign({}, overrides);
overrides[monitorCard.monitorName] = value; // overrides[monitorCard.monitorName] = value;
Settings.settings.monitorScaleOverrides = overrides; // Settings.settings.monitorScaleOverrides = overrides;
parent.currentValue = value; // parent.currentValue = value;
} // }
} // }
} // }
Text { text: parent.currentValue.toFixed(2); font.pixelSize: 12 * Theme.scale(screen); color: Theme.textPrimary; width: 36 } // Text { text: parent.currentValue.toFixed(2); font.pixelSize: 12 * Theme.scale(screen); color: Theme.textPrimary; width: 36 }
} // }
} // }
} }
} }
} }