Settings: Harmonized display tab
This commit is contained in:
parent
a4ce7eb961
commit
fe6a394448
2 changed files with 94 additions and 79 deletions
|
|
@ -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,95 +26,108 @@ 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
|
||||||
|
|
||||||
NText {
|
ColumnLayout {
|
||||||
text: "Per‑monitor configuration"
|
width: parent.width
|
||||||
font.weight: Style.fontWeightBold
|
ColumnLayout {
|
||||||
color: Colors.accentSecondary
|
spacing: Style.marginLarge * scaling
|
||||||
}
|
Layout.margins: Style.marginLarge * scaling
|
||||||
|
|
||||||
Repeater {
|
|
||||||
model: Quickshell.screens || []
|
|
||||||
delegate: Rectangle {
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
radius: Style.radiusMedium * scaling
|
|
||||||
color: Colors.surface
|
|
||||||
border.color: Colors.outline
|
|
||||||
border.width: Math.max(1, Style.borderThin * scaling)
|
|
||||||
implicitHeight: contentCol.implicitHeight + Style.marginLarge * scaling
|
|
||||||
|
|
||||||
ColumnLayout {
|
NText {
|
||||||
id: contentCol
|
text: "Per‑monitor configuration"
|
||||||
anchors.fill: parent
|
font.pointSize: Style.fontSizeXL * scaling
|
||||||
anchors.margins: Style.marginMedium * scaling
|
font.weight: Style.fontWeightBold
|
||||||
spacing: Style.marginSmall * scaling
|
color: Colors.textPrimary
|
||||||
|
}
|
||||||
|
|
||||||
NText {
|
Repeater {
|
||||||
text: (modelData.name || "Unknown")
|
model: Quickshell.screens || []
|
||||||
font.weight: Style.fontWeightBold
|
delegate: Rectangle {
|
||||||
color: Colors.accentPrimary
|
Layout.fillWidth: true
|
||||||
}
|
radius: Style.radiusMedium * scaling
|
||||||
|
color: Colors.surface
|
||||||
|
border.color: Colors.outline
|
||||||
|
border.width: Math.max(1, Style.borderThin * scaling)
|
||||||
|
implicitHeight: contentCol.implicitHeight + Style.marginXL * 2 * scaling
|
||||||
|
|
||||||
RowLayout {
|
ColumnLayout {
|
||||||
spacing: Style.marginMedium * scaling
|
id: contentCol
|
||||||
NText {
|
anchors.fill: parent
|
||||||
text: `Resolution: ${modelData.width}x${modelData.height}`
|
anchors.margins: Style.marginLarge * scaling
|
||||||
color: Colors.textSecondary
|
spacing: Style.marginTiniest * scaling
|
||||||
}
|
|
||||||
NText {
|
|
||||||
text: `Position: (${modelData.x}, ${modelData.y})`
|
|
||||||
color: Colors.textSecondary
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
NToggle {
|
NText {
|
||||||
label: "Bar"
|
text: (modelData.name || "Unknown")
|
||||||
description: "Display the top bar on this monitor"
|
font.pointSize: Style.fontSizeLarge * scaling
|
||||||
value: (Settings.data.bar.monitors || []).indexOf(modelData.name) !== -1
|
font.weight: Style.fontWeightBold
|
||||||
onToggled: function (newValue) {
|
color: Colors.accentSecondary
|
||||||
if (newValue) {
|
|
||||||
Settings.data.bar.monitors = addMonitor(Settings.data.bar.monitors, modelData.name)
|
|
||||||
} else {
|
|
||||||
Settings.data.bar.monitors = removeMonitor(Settings.data.bar.monitors, modelData.name)
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
NToggle {
|
NText {
|
||||||
label: "Dock"
|
text: `Resolution: ${modelData.width}x${modelData.height} - Position: (${modelData.x}, ${modelData.y})`
|
||||||
description: "Display the dock on this monitor"
|
font.pointSize: Style.fontSizeSmall * scaling
|
||||||
value: (Settings.data.dock.monitors || []).indexOf(modelData.name) !== -1
|
color: Colors.textSecondary
|
||||||
onToggled: function (newValue) {
|
|
||||||
if (newValue) {
|
|
||||||
Settings.data.dock.monitors = addMonitor(Settings.data.dock.monitors, modelData.name)
|
|
||||||
} else {
|
|
||||||
Settings.data.dock.monitors = removeMonitor(Settings.data.dock.monitors, modelData.name)
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
NToggle {
|
ColumnLayout {
|
||||||
label: "Notifications"
|
spacing: Style.marginLarge * scaling
|
||||||
description: "Display notifications on this monitor"
|
|
||||||
value: (Settings.data.notifications.monitors || []).indexOf(modelData.name) !== -1
|
NToggle {
|
||||||
onToggled: function (newValue) {
|
label: "Bar"
|
||||||
if (newValue) {
|
description: "Display the top bar on this monitor"
|
||||||
Settings.data.notifications.monitors = addMonitor(Settings.data.notifications.monitors, modelData.name)
|
value: (Settings.data.bar.monitors || []).indexOf(modelData.name) !== -1
|
||||||
} else {
|
onToggled: function (newValue) {
|
||||||
Settings.data.notifications.monitors = removeMonitor(Settings.data.notifications.monitors,
|
if (newValue) {
|
||||||
modelData.name)
|
Settings.data.bar.monitors = addMonitor(Settings.data.bar.monitors, modelData.name)
|
||||||
|
} else {
|
||||||
|
Settings.data.bar.monitors = removeMonitor(Settings.data.bar.monitors, modelData.name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
NToggle {
|
||||||
|
label: "Dock"
|
||||||
|
description: "Display the dock on this monitor"
|
||||||
|
value: (Settings.data.dock.monitors || []).indexOf(modelData.name) !== -1
|
||||||
|
onToggled: function (newValue) {
|
||||||
|
if (newValue) {
|
||||||
|
Settings.data.dock.monitors = addMonitor(Settings.data.dock.monitors, modelData.name)
|
||||||
|
} else {
|
||||||
|
Settings.data.dock.monitors = removeMonitor(Settings.data.dock.monitors, modelData.name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
NToggle {
|
||||||
|
label: "Notifications"
|
||||||
|
description: "Display notifications on this monitor"
|
||||||
|
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)
|
||||||
|
} else {
|
||||||
|
Settings.data.notifications.monitors = removeMonitor(Settings.data.notifications.monitors,
|
||||||
|
modelData.name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
@ -55,12 +56,11 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NDivider {
|
NDivider {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: Style.marginLarge * scaling
|
Layout.topMargin: Style.marginLarge * scaling
|
||||||
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
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue