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 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

View file

@ -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 }
// }
// }
}
}
}