added services page + rename barConfig json property to bar, migration helper function
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick.Layouts
|
||||
import qs.Config
|
||||
import qs.Components
|
||||
import qs.Modules.SettingsNew.Common
|
||||
|
||||
PageBase {
|
||||
id: root
|
||||
|
||||
readonly property list<MenuItem> clockFormats: [
|
||||
MenuItem {
|
||||
text: qsTr("Long format")
|
||||
value: "dddd d MMM - hh:mm"
|
||||
},
|
||||
MenuItem {
|
||||
text: qsTr("Short format")
|
||||
value: "ddd d MMM - hh:mm"
|
||||
},
|
||||
MenuItem {
|
||||
text: qsTr("Time only")
|
||||
value: "hh:mm"
|
||||
},
|
||||
MenuItem {
|
||||
text: qsTr("Long format seconds")
|
||||
value: "dddd d MMM - hh:mm:ss"
|
||||
},
|
||||
MenuItem {
|
||||
text: qsTr("Short format seconds")
|
||||
value: "ddd d MMM - hh:mm:ss"
|
||||
},
|
||||
MenuItem {
|
||||
text: qsTr("Time only seconds")
|
||||
value: "hh:mm:ss"
|
||||
}
|
||||
]
|
||||
|
||||
isSubPage: true
|
||||
title: qsTr("Clock")
|
||||
|
||||
ColumnLayout {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
spacing: Appearance.spacing.extraSmall / 2
|
||||
width: root.cappedWidth
|
||||
|
||||
SelectRow {
|
||||
Layout.topMargin: Appearance.spacing.extraSmall / 2 - parent.spacing
|
||||
active: root.clockFormats.find(item => item.value === Config.general.dateFormat)
|
||||
first: true
|
||||
last: true
|
||||
menuItems: root.clockFormats
|
||||
subtext: qsTr("Change how time is displayed in the widget")
|
||||
text: qsTr("Time format")
|
||||
|
||||
onSelected: item => {
|
||||
Config.general.dateFormat = item.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick.Layouts
|
||||
import qs.Config
|
||||
import qs.Modules.SettingsNew.Common
|
||||
|
||||
PageBase {
|
||||
id: root
|
||||
|
||||
isSubPage: true
|
||||
title: qsTr("System icons")
|
||||
|
||||
ColumnLayout {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
spacing: Appearance.spacing.extraSmall / 2
|
||||
width: root.cappedWidth
|
||||
|
||||
// Visible icons
|
||||
SectionHeader {
|
||||
first: true
|
||||
text: qsTr("Visible icons")
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.bar.tray.showAudio
|
||||
first: true
|
||||
text: qsTr("Speakers")
|
||||
|
||||
onToggled: Config.bar.tray.showAudio = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.bar.tray.showMicrophone
|
||||
text: qsTr("Microphone")
|
||||
|
||||
onToggled: Config.bar.tray.showMicrophone = checked
|
||||
}
|
||||
|
||||
//////// FOR LATER:
|
||||
// ToggleRow {
|
||||
// checked: Config.bar.tray.showNetwork
|
||||
// text: qsTr("Network")
|
||||
//
|
||||
// onToggled: Config.bar.tray.showNetwork = checked
|
||||
// }
|
||||
//
|
||||
// ToggleRow {
|
||||
// checked: Config.bar.tray.showWifi
|
||||
// text: qsTr("Wi-Fi")
|
||||
//
|
||||
// onToggled: Config.bar.tray.showWifi = checked
|
||||
// }
|
||||
//
|
||||
// ToggleRow {
|
||||
// checked: Config.bar.tray.showBluetooth
|
||||
// text: qsTr("Bluetooth")
|
||||
//
|
||||
// onToggled: Config.bar.tray.showBluetooth = checked
|
||||
// }
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.bar.tray.showPower
|
||||
last: true
|
||||
text: qsTr("Battery")
|
||||
|
||||
onToggled: Config.bar.tray.showPower = checked
|
||||
}
|
||||
|
||||
// Behaviour
|
||||
SectionHeader {
|
||||
text: qsTr("Behavior")
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.bar.popouts.audio
|
||||
first: true
|
||||
subtext: qsTr("Show a details popout when hovering the audio icons")
|
||||
text: qsTr("Audio popout on hover")
|
||||
|
||||
onToggled: Config.bar.popouts.audio = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.bar.popouts.upower
|
||||
last: true
|
||||
subtext: qsTr("Show a details popout when hovering the power icon")
|
||||
text: qsTr("Power popout on hover")
|
||||
|
||||
onToggled: Config.bar.popouts.upower = checked
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick.Layouts
|
||||
import qs.Config
|
||||
import qs.Modules.SettingsNew.Common
|
||||
|
||||
PageBase {
|
||||
id: root
|
||||
|
||||
isSubPage: true
|
||||
title: qsTr("Tray")
|
||||
|
||||
ColumnLayout {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
spacing: Appearance.spacing.extraSmall / 2
|
||||
width: root.cappedWidth
|
||||
|
||||
SpinRow {
|
||||
first: true
|
||||
from: 12
|
||||
last: true
|
||||
stepSize: 1
|
||||
text: qsTr("Icon size")
|
||||
to: 24
|
||||
value: Config.bar.tray.trayIconSize
|
||||
|
||||
onMoved: value => Config.bar.tray.trayIconSize = value
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user