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

View file

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