Settings: Harmonized display tab

This commit is contained in:
quadbyte 2025-08-13 00:50:53 -04:00
parent a4ce7eb961
commit fe6a394448
2 changed files with 94 additions and 79 deletions

View file

@ -1,5 +1,6 @@
import QtQuick import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Controls
import Quickshell import Quickshell
import qs.Services import qs.Services
import qs.Widgets import qs.Widgets
@ -25,14 +26,25 @@ Item {
}) })
} }
ColumnLayout { ScrollView {
anchors.fill: parent anchors.fill: parent
spacing: Style.marginMedium * scaling clip: true
ScrollBar.vertical.policy: ScrollBar.AsNeeded
ScrollBar.horizontal.policy: ScrollBar.AsNeeded
contentWidth: parent.width
ColumnLayout {
width: parent.width
ColumnLayout {
spacing: Style.marginLarge * scaling
Layout.margins: Style.marginLarge * scaling
Layout.fillWidth: true
NText { NText {
text: "Permonitor configuration" text: "Permonitor configuration"
font.pointSize: Style.fontSizeXL * scaling
font.weight: Style.fontWeightBold font.weight: Style.fontWeightBold
color: Colors.accentSecondary color: Colors.textPrimary
} }
Repeater { Repeater {
@ -43,31 +55,29 @@ Item {
color: Colors.surface color: Colors.surface
border.color: Colors.outline border.color: Colors.outline
border.width: Math.max(1, Style.borderThin * scaling) border.width: Math.max(1, Style.borderThin * scaling)
implicitHeight: contentCol.implicitHeight + Style.marginLarge * scaling implicitHeight: contentCol.implicitHeight + Style.marginXL * 2 * scaling
ColumnLayout { ColumnLayout {
id: contentCol id: contentCol
anchors.fill: parent anchors.fill: parent
anchors.margins: Style.marginMedium * scaling anchors.margins: Style.marginLarge * scaling
spacing: Style.marginSmall * scaling spacing: Style.marginTiniest * scaling
NText { NText {
text: (modelData.name || "Unknown") text: (modelData.name || "Unknown")
font.pointSize: Style.fontSizeLarge * scaling
font.weight: Style.fontWeightBold font.weight: Style.fontWeightBold
color: Colors.accentPrimary color: Colors.accentSecondary
} }
RowLayout {
spacing: Style.marginMedium * scaling
NText { NText {
text: `Resolution: ${modelData.width}x${modelData.height}` text: `Resolution: ${modelData.width}x${modelData.height} - Position: (${modelData.x}, ${modelData.y})`
font.pointSize: Style.fontSizeSmall * scaling
color: Colors.textSecondary color: Colors.textSecondary
} }
NText {
text: `Position: (${modelData.x}, ${modelData.y})` ColumnLayout {
color: Colors.textSecondary spacing: Style.marginLarge * scaling
}
}
NToggle { NToggle {
label: "Bar" label: "Bar"
@ -101,7 +111,8 @@ Item {
value: (Settings.data.notifications.monitors || []).indexOf(modelData.name) !== -1 value: (Settings.data.notifications.monitors || []).indexOf(modelData.name) !== -1
onToggled: function (newValue) { onToggled: function (newValue) {
if (newValue) { if (newValue) {
Settings.data.notifications.monitors = addMonitor(Settings.data.notifications.monitors, modelData.name) Settings.data.notifications.monitors = addMonitor(Settings.data.notifications.monitors,
modelData.name)
} else { } else {
Settings.data.notifications.monitors = removeMonitor(Settings.data.notifications.monitors, Settings.data.notifications.monitors = removeMonitor(Settings.data.notifications.monitors,
modelData.name) modelData.name)
@ -111,9 +122,12 @@ Item {
} }
} }
} }
}
Item { Item {
Layout.fillHeight: true Layout.fillHeight: true
} }
} }
} }
}
}

View file

@ -30,6 +30,7 @@ Item {
// Current wallpaper display // Current wallpaper display
NText { NText {
text: "Current Wallpaper" text: "Current Wallpaper"
font.pointSize: Style.fontSizeXL * scaling
font.weight: Style.fontWeightBold font.weight: Style.fontWeightBold
color: Colors.textPrimary color: Colors.textPrimary
} }
@ -61,7 +62,6 @@ Item {
Layout.bottomMargin: Style.marginLarge * scaling Layout.bottomMargin: Style.marginLarge * scaling
} }
RowLayout { RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
@ -71,6 +71,7 @@ Item {
// Wallpaper grid // Wallpaper grid
NText { NText {
text: "Wallpaper Selector" text: "Wallpaper Selector"
font.pointSize: Style.fontSizeXL * scaling
font.weight: Style.fontWeightBold font.weight: Style.fontWeightBold
color: Colors.textPrimary color: Colors.textPrimary
} }