Settings: Wallpaper Tabs cleanup
This commit is contained in:
parent
050877bcb0
commit
27e7745549
4 changed files with 158 additions and 138 deletions
|
|
@ -67,20 +67,20 @@ NLoader {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: Style.marginSmall * scaling
|
spacing: Style.marginSmall * scaling
|
||||||
NSlider {
|
NSlider {
|
||||||
id: scaleSlider
|
id: scaleSlider
|
||||||
from: 0.6
|
from: 0.6
|
||||||
to: 1.8
|
to: 1.8
|
||||||
stepSize: 0.01
|
stepSize: 0.01
|
||||||
value: Scaling.overrideScale
|
value: Scaling.overrideScale
|
||||||
implicitWidth: bgRect.width * 0.75
|
implicitWidth: bgRect.width * 0.75
|
||||||
onMoved: {
|
onMoved: {
|
||||||
|
|
||||||
|
}
|
||||||
|
onPressedChanged: {
|
||||||
|
Scaling.overrideScale = value
|
||||||
|
Scaling.overrideEnabled = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
onPressedChanged: {
|
|
||||||
Scaling.overrideScale = value
|
|
||||||
Scaling.overrideEnabled = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "refresh"
|
icon: "refresh"
|
||||||
fontPointSize: Style.fontSizeLarge * scaling
|
fontPointSize: Style.fontSizeLarge * scaling
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import qs.Widgets
|
||||||
NLoader {
|
NLoader {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
readonly property real scaling: Scaling.scale(screen)
|
||||||
|
|
||||||
content: Component {
|
content: Component {
|
||||||
NPanel {
|
NPanel {
|
||||||
|
|
@ -18,7 +18,6 @@ NLoader {
|
||||||
|
|
||||||
WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
|
WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
|
||||||
|
|
||||||
|
|
||||||
property int currentTabIndex: 0
|
property int currentTabIndex: 0
|
||||||
property var tabsModel: [{
|
property var tabsModel: [{
|
||||||
"label": "General",
|
"label": "General",
|
||||||
|
|
|
||||||
|
|
@ -29,44 +29,31 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: 4
|
spacing: Style.marginTiny * scaling
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
NText {
|
NText {
|
||||||
text: "Wallpaper Settings"
|
text: "Directory"
|
||||||
font.pointSize: 18
|
font.pointSize: Style.fontSizeXL * scaling
|
||||||
font.weight: Style.fontWeightBold
|
font.weight: Style.fontWeightBold
|
||||||
color: Colors.textPrimary
|
color: Colors.textPrimary
|
||||||
Layout.bottomMargin: 8
|
Layout.bottomMargin: Style.marginSmall * scaling
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wallpaper Settings Category
|
// Wallpaper Settings Category
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: 8
|
spacing: 8
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: 8
|
Layout.topMargin: Style.marginSmall * scaling
|
||||||
|
|
||||||
// Wallpaper Folder
|
// Wallpaper Folder
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: 8
|
spacing: Style.marginSmall * scaling
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
NText {
|
|
||||||
text: "Wallpaper Folder"
|
|
||||||
font.pointSize: 13
|
|
||||||
font.weight: Style.fontWeightBold
|
|
||||||
color: Colors.textPrimary
|
|
||||||
}
|
|
||||||
|
|
||||||
NText {
|
|
||||||
text: "Path to your wallpaper folder"
|
|
||||||
font.pointSize: 12
|
|
||||||
color: Colors.textSecondary
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
|
|
||||||
NTextInput {
|
NTextInput {
|
||||||
|
label: "Wallpaper Directory"
|
||||||
|
description: "Path to your wallpaper directory"
|
||||||
text: Settings.data.wallpaper.directory
|
text: Settings.data.wallpaper.directory
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
onEditingFinished: {
|
onEditingFinished: {
|
||||||
|
|
@ -79,12 +66,12 @@ ColumnLayout {
|
||||||
|
|
||||||
NDivider {
|
NDivider {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: 26
|
Layout.topMargin: Style.marginLarge * 2 * scaling
|
||||||
Layout.bottomMargin: 18
|
Layout.bottomMargin: Style.marginLarge * scaling
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: 4
|
spacing: Style.marginLarge * scaling
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
NText {
|
NText {
|
||||||
|
|
@ -115,29 +102,54 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wallpaper Interval
|
// Interval
|
||||||
// NSlider {
|
ColumnLayout {
|
||||||
// label: "Wallpaper Interval"
|
RowLayout {
|
||||||
// description: "How often to change wallpapers automatically (in seconds)"
|
Layout.fillWidth: true
|
||||||
// valueSuffix: "s"
|
|
||||||
// from: 10
|
ColumnLayout {
|
||||||
// to: 900
|
NText {
|
||||||
// stepSize: 10
|
text: "Wallpaper Interval"
|
||||||
// value: Settings.data.wallpaper.randomInterval
|
font.weight: Style.fontWeightBold
|
||||||
// onPressedChanged: function (pressed, value) {
|
color: Colors.textPrimary
|
||||||
// Settings.data.wallpaper.randomInterval = Math.round(value)
|
}
|
||||||
// }
|
|
||||||
// cutoutColor: Colors.backgroundPrimary
|
NText {
|
||||||
// Layout.fillWidth: true
|
text: "How often to change wallpapers automatically (in seconds)"
|
||||||
// }
|
font.pointSize: Style.fontSizeSmall * scaling
|
||||||
|
color: Colors.textSecondary
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
NText {
|
||||||
|
text: sliderWpInterval.value + " seconds"
|
||||||
|
Layout.alignment: Qt.AlignBottom | Qt.AlignRight
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
NSlider {
|
||||||
|
id: sliderWpInterval
|
||||||
|
Layout.fillWidth: true
|
||||||
|
from: 10
|
||||||
|
to: 900
|
||||||
|
stepSize: 10
|
||||||
|
value: Settings.data.wallpaper.randomInterval
|
||||||
|
onPressedChanged: Settings.data.wallpaper.randomInterval = Math.round(value)
|
||||||
|
cutoutColor: Colors.backgroundPrimary
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NDivider {
|
NDivider {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: 26
|
Layout.topMargin: Style.marginLarge * 2 * scaling
|
||||||
Layout.bottomMargin: 18
|
Layout.bottomMargin: Style.marginLarge * scaling
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// -------------------------------
|
||||||
|
// SWWW
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: 4
|
spacing: 4
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
@ -168,97 +180,106 @@ ColumnLayout {
|
||||||
visible: Settings.data.wallpaper.swww.enabled
|
visible: Settings.data.wallpaper.swww.enabled
|
||||||
|
|
||||||
// Resize Mode
|
// Resize Mode
|
||||||
ColumnLayout {
|
NComboBox {
|
||||||
spacing: 8
|
label: "Resize Mode"
|
||||||
Layout.fillWidth: true
|
description: "How SWWW should resize wallpapers to fit the screen"
|
||||||
|
optionsKeys: ["no", "crop", "fit", "stretch"]
|
||||||
NText {
|
optionsLabels: ["No", "Crop", "Fit", "Stretch"]
|
||||||
text: "Resize Mode"
|
currentKey: Settings.data.wallpaper.swww.resizeMethod
|
||||||
font.pointSize: 13
|
onSelected: function (key) {
|
||||||
font.weight: Style.fontWeightBold
|
Settings.data.wallpaper.swww.resizeMethod = key
|
||||||
color: Colors.textPrimary
|
|
||||||
}
|
|
||||||
|
|
||||||
NText {
|
|
||||||
text: "How SWWW should resize wallpapers to fit the screen"
|
|
||||||
font.pointSize: 12
|
|
||||||
color: Colors.textSecondary
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
|
|
||||||
NComboBox {
|
|
||||||
optionsKeys: ["no", "crop", "fit", "stretch"]
|
|
||||||
optionsLabels: ["No", "Crop", "Fit", "Stretch"]
|
|
||||||
currentKey: Settings.data.wallpaper.swww.resizeMethod
|
|
||||||
onSelected: function (key) {
|
|
||||||
Settings.data.wallpaper.swww.resizeMethod = key
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Transition Type
|
// Transition Type
|
||||||
ColumnLayout {
|
NComboBox {
|
||||||
spacing: 8
|
label: "Transition Type"
|
||||||
Layout.fillWidth: true
|
description: "Animation type when switching between wallpapers"
|
||||||
Layout.topMargin: 8
|
optionsKeys: ["none", "simple", "fade", "left", "right", "top", "bottom", "wipe", "wave", "grow", "center", "any", "outer", "random"]
|
||||||
|
optionsLabels: ["None", "Simple", "Fade", "Left", "Right", "Top", "Bottom", "Wipe", "Wave", "Grow", "Center", "Any", "Outer", "Random"]
|
||||||
NText {
|
currentKey: Settings.data.wallpaper.swww.transitionType
|
||||||
text: "Transition Type"
|
onSelected: function (key) {
|
||||||
font.pointSize: 13
|
Settings.data.wallpaper.swww.transitionType = key
|
||||||
font.weight: Style.fontWeightBold
|
|
||||||
color: Colors.textPrimary
|
|
||||||
}
|
|
||||||
|
|
||||||
NText {
|
|
||||||
text: "Animation type when switching between wallpapers"
|
|
||||||
font.pointSize: 12
|
|
||||||
color: Colors.textSecondary
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
|
|
||||||
NComboBox {
|
|
||||||
optionsKeys: ["none", "simple", "fade", "left", "right", "top", "bottom", "wipe", "wave", "grow", "center", "any", "outer", "random"]
|
|
||||||
optionsLabels: ["None", "Simple", "Fade", "Left", "Right", "Top", "Bottom", "Wipe", "Wave", "Grow", "Center", "Any", "Outer", "Random"]
|
|
||||||
currentKey: Settings.data.wallpaper.swww.transitionType
|
|
||||||
onSelected: function (key) {
|
|
||||||
Settings.data.wallpaper.swww.transitionType = key
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Transition FPS
|
// Transition FPS
|
||||||
// NSlider {
|
ColumnLayout {
|
||||||
// label: "Transition FPS"
|
RowLayout {
|
||||||
// description: "Frames per second for transition animations"
|
Layout.fillWidth: true
|
||||||
// valueSuffix: " FPS"
|
|
||||||
// from: 30
|
ColumnLayout {
|
||||||
// to: 500
|
NText {
|
||||||
// stepSize: 5
|
text: "Transition FPS"
|
||||||
// value: Settings.data.wallpaper.swww.transitionFps
|
font.weight: Style.fontWeightBold
|
||||||
// onPressedChanged: function (pressed, value) {
|
color: Colors.textPrimary
|
||||||
// Settings.data.wallpaper.swww.transitionFps = Math.round(value)
|
}
|
||||||
// }
|
|
||||||
// cutoutColor: Colors.backgroundPrimary
|
NText {
|
||||||
// Layout.fillWidth: true
|
text: "Frames per second for transition animations"
|
||||||
// }
|
font.pointSize: Style.fontSizeSmall * scaling
|
||||||
|
color: Colors.textSecondary
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
NText {
|
||||||
|
text: sliderWpTransitionFps.value + " FPS"
|
||||||
|
Layout.alignment: Qt.AlignBottom | Qt.AlignRight
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
NSlider {
|
||||||
|
id: sliderWpTransitionFps
|
||||||
|
Layout.fillWidth: true
|
||||||
|
from: 30
|
||||||
|
to: 500
|
||||||
|
stepSize: 5
|
||||||
|
value: Settings.data.wallpaper.swww.transitionFps
|
||||||
|
onPressedChanged: Settings.data.wallpaper.swww.transitionFps = Math.round(value)
|
||||||
|
cutoutColor: Colors.backgroundPrimary
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Transition Duration
|
// Transition Duration
|
||||||
// NSlider {
|
ColumnLayout {
|
||||||
// label: "Transition Duration"
|
RowLayout {
|
||||||
// description: "Duration of transition animations in seconds"
|
Layout.fillWidth: true
|
||||||
// valueSuffix: "s"
|
|
||||||
// from: 0.25
|
ColumnLayout {
|
||||||
// to: 10
|
NText {
|
||||||
// stepSize: 0.05
|
text: "Transition Duration"
|
||||||
// value: Settings.data.wallpaper.swww.transitionDuration
|
font.weight: Style.fontWeightBold
|
||||||
// onPressedChanged: function (pressed, value) {
|
color: Colors.textPrimary
|
||||||
// Settings.data.wallpaper.swww.transitionDuration = value
|
}
|
||||||
// }
|
|
||||||
// cutoutColor: Colors.backgroundPrimary
|
NText {
|
||||||
// Layout.fillWidth: true
|
text: "Duration of transition animations in seconds"
|
||||||
// }
|
font.pointSize: Style.fontSizeSmall * scaling
|
||||||
|
color: Colors.textSecondary
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
NText {
|
||||||
|
text: sliderWpTransitionDuration.value.toFixed(2) + "s"
|
||||||
|
Layout.alignment: Qt.AlignBottom | Qt.AlignRight
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
NSlider {
|
||||||
|
id: sliderWpTransitionDuration
|
||||||
|
Layout.fillWidth: true
|
||||||
|
from: 0.25
|
||||||
|
to: 10
|
||||||
|
stepSize: 0.05
|
||||||
|
value: Settings.data.wallpaper.swww.transitionDuration
|
||||||
|
onPressedChanged: Settings.data.wallpaper.swww.transitionDuration = value
|
||||||
|
cutoutColor: Colors.backgroundPrimary
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -88,4 +88,4 @@ Slider {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue