Wallpaper: less intrusive UI when using per monitor directories
This commit is contained in:
parent
f679999453
commit
a2ecc67643
1 changed files with 24 additions and 21 deletions
|
|
@ -15,7 +15,7 @@ ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
NTextInput {
|
NTextInput {
|
||||||
label: "Wallpaper Directory"
|
label: "Wallpaper Directory"
|
||||||
description: "Path to your wallpaper directory."
|
description: "Path to your common wallpaper directory."
|
||||||
text: Settings.data.wallpaper.directory
|
text: Settings.data.wallpaper.directory
|
||||||
onEditingFinished: {
|
onEditingFinished: {
|
||||||
Settings.data.wallpaper.directory = text
|
Settings.data.wallpaper.directory = text
|
||||||
|
|
@ -31,31 +31,34 @@ ColumnLayout {
|
||||||
onToggled: checked => Settings.data.wallpaper.enableMultiMonitorDirectories = checked
|
onToggled: checked => Settings.data.wallpaper.enableMultiMonitorDirectories = checked
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
NBox {
|
||||||
visible: Settings.data.wallpaper.enableMultiMonitorDirectories
|
visible: Settings.data.wallpaper.enableMultiMonitorDirectories
|
||||||
spacing: Style.marginL * scaling
|
|
||||||
Repeater {
|
|
||||||
model: Quickshell.screens || []
|
|
||||||
delegate: Rectangle {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.minimumWidth: 550 * scaling
|
|
||||||
radius: Style.radiusM * scaling
|
|
||||||
color: Color.mSurface
|
|
||||||
border.color: Color.mOutline
|
|
||||||
border.width: Math.max(1, Style.borderS * scaling)
|
|
||||||
implicitHeight: contentCol.implicitHeight + Style.marginXL * 2 * scaling
|
|
||||||
|
|
||||||
ColumnLayout {
|
Layout.fillWidth: true
|
||||||
id: contentCol
|
Layout.minimumWidth: 550 * scaling
|
||||||
anchors.fill: parent
|
radius: Style.radiusM * scaling
|
||||||
anchors.margins: Style.marginL * scaling
|
color: Color.mSurfaceVariant
|
||||||
spacing: Style.marginXXS * scaling
|
border.color: Color.mOutline
|
||||||
|
border.width: Math.max(1, Style.borderS * scaling)
|
||||||
|
implicitHeight: contentCol.implicitHeight + Style.marginXL * 2 * scaling
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
id: contentCol
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.margins: Style.marginXL * scaling
|
||||||
|
spacing: Style.marginM * scaling
|
||||||
|
Repeater {
|
||||||
|
model: Quickshell.screens || []
|
||||||
|
delegate: RowLayout {
|
||||||
|
NText {
|
||||||
|
text: (modelData.name || "Unknown")
|
||||||
|
color: Color.mSecondary
|
||||||
|
font.weight: Style.fontWeightBold
|
||||||
|
Layout.preferredWidth: 90 * scaling
|
||||||
|
}
|
||||||
NTextInput {
|
NTextInput {
|
||||||
label: (modelData.name || "Unknown")
|
Layout.fillWidth: true
|
||||||
description: `Path to your wallpaper directory for "${(modelData.name || "Unknown")}" monitor`
|
|
||||||
text: WallpaperService.getMonitorDirectory(modelData.name)
|
text: WallpaperService.getMonitorDirectory(modelData.name)
|
||||||
labelColor: Color.mSecondary
|
|
||||||
onEditingFinished: WallpaperService.setMonitorDirectory(modelData.name, text)
|
onEditingFinished: WallpaperService.setMonitorDirectory(modelData.name, text)
|
||||||
Layout.maximumWidth: 420 * scaling
|
Layout.maximumWidth: 420 * scaling
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue