Settings formatting (qmlfmt)
This commit is contained in:
parent
bbffe39fe0
commit
41d93128b8
10 changed files with 192 additions and 62 deletions
|
|
@ -20,21 +20,48 @@ NLoader {
|
||||||
// Active tab index unified for sidebar, header, and content stack
|
// Active tab index unified for sidebar, header, and content stack
|
||||||
property int currentTabIndex: 0
|
property int currentTabIndex: 0
|
||||||
// Single source of truth for tabs (explicit icon/label here)
|
// Single source of truth for tabs (explicit icon/label here)
|
||||||
property var tabsModel: [
|
property var tabsModel: [{
|
||||||
{ icon: "tune", label: "General", source: "Tabs/General.qml" },
|
"icon": "tune",
|
||||||
{ icon: "web_asset", label: "Bar", source: "Tabs/Bar.qml" },
|
"label": "General",
|
||||||
{ icon: "schedule", label: "Time & Weather", source: "Tabs/TimeWeather.qml" },
|
"source": "Tabs/General.qml"
|
||||||
{ icon: "videocam", label: "Screen Recorder", source: "Tabs/ScreenRecorder.qml" },
|
}, {
|
||||||
{ icon: "wifi", label: "Network", source: "Tabs/Network.qml" },
|
"icon": "web_asset",
|
||||||
{ icon: "monitor", label: "Display", source: "Tabs/Display.qml" },
|
"label": "Bar",
|
||||||
{ icon: "image", label: "Wallpaper", source: "Tabs/Wallpaper.qml" },
|
"source": "Tabs/Bar.qml"
|
||||||
{ icon: "more_horiz", label: "Misc", source: "Tabs/Misc.qml" },
|
}, {
|
||||||
{ icon: "info", label: "About", source: "Tabs/About.qml" }
|
"icon": "schedule",
|
||||||
]
|
"label": "Time & Weather",
|
||||||
|
"source": "Tabs/TimeWeather.qml"
|
||||||
|
}, {
|
||||||
|
"icon": "videocam",
|
||||||
|
"label": "Screen Recorder",
|
||||||
|
"source": "Tabs/ScreenRecorder.qml"
|
||||||
|
}, {
|
||||||
|
"icon": "wifi",
|
||||||
|
"label": "Network",
|
||||||
|
"source": "Tabs/Network.qml"
|
||||||
|
}, {
|
||||||
|
"icon": "monitor",
|
||||||
|
"label": "Display",
|
||||||
|
"source": "Tabs/Display.qml"
|
||||||
|
}, {
|
||||||
|
"icon": "image",
|
||||||
|
"label": "Wallpaper",
|
||||||
|
"source": "Tabs/Wallpaper.qml"
|
||||||
|
}, {
|
||||||
|
"icon": "more_horiz",
|
||||||
|
"label": "Misc",
|
||||||
|
"source": "Tabs/Misc.qml"
|
||||||
|
}, {
|
||||||
|
"icon": "info",
|
||||||
|
"label": "About",
|
||||||
|
"source": "Tabs/About.qml"
|
||||||
|
}]
|
||||||
|
|
||||||
// Always default to the first tab (General) when the panel becomes visible
|
// Always default to the first tab (General) when the panel becomes visible
|
||||||
onVisibleChanged: function () {
|
onVisibleChanged: function () {
|
||||||
if (visible) currentTabIndex = 0
|
if (visible)
|
||||||
|
currentTabIndex = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure panel shows itself once created
|
// Ensure panel shows itself once created
|
||||||
|
|
@ -52,8 +79,9 @@ NLoader {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|
||||||
// Prevent closing when clicking in the panel bg
|
// Prevent closing when clicking in the panel bg
|
||||||
MouseArea { anchors.fill: parent }
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
}
|
||||||
|
|
||||||
// Main two-pane layout
|
// Main two-pane layout
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
|
@ -97,12 +125,21 @@ NLoader {
|
||||||
NText {
|
NText {
|
||||||
text: modelData.icon
|
text: modelData.icon
|
||||||
font.family: "Material Symbols Outlined"
|
font.family: "Material Symbols Outlined"
|
||||||
font.variableAxes: { "wght": (Font.Normal + Font.Bold) / 2.0 }
|
font.variableAxes: {
|
||||||
|
"wght": (Font.Normal + Font.Bold) / 2.0
|
||||||
|
}
|
||||||
color: selected ? Colors.onAccent : Colors.textSecondary
|
color: selected ? Colors.onAccent : Colors.textSecondary
|
||||||
}
|
}
|
||||||
NText { text: modelData.label; color: selected ? Colors.onAccent : Colors.textPrimary; Layout.fillWidth: true }
|
NText {
|
||||||
|
text: modelData.label
|
||||||
|
color: selected ? Colors.onAccent : Colors.textPrimary
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: settingsPanel.currentTabIndex = index
|
||||||
}
|
}
|
||||||
MouseArea { anchors.fill: parent; onClicked: settingsPanel.currentTabIndex = index }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -142,11 +179,15 @@ NLoader {
|
||||||
icon: "close"
|
icon: "close"
|
||||||
tooltipText: "Close settings panel"
|
tooltipText: "Close settings panel"
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
onClicked: function () { settingsWindow.isLoaded = !settingsWindow.isLoaded }
|
onClicked: function () {
|
||||||
|
settingsWindow.isLoaded = !settingsWindow.isLoaded
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NDivider { Layout.fillWidth: true }
|
NDivider {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
// Stacked pages
|
// Stacked pages
|
||||||
StackLayout {
|
StackLayout {
|
||||||
|
|
@ -172,4 +213,3 @@ NLoader {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,17 @@ Item {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: Style.marginMedium * scaling
|
spacing: Style.marginMedium * scaling
|
||||||
NText { text: "About"; font.weight: Style.fontWeightBold; color: Colors.accentSecondary }
|
NText {
|
||||||
NText { text: "Coming soon"; color: Colors.textSecondary }
|
text: "About"
|
||||||
Item { Layout.fillHeight: true }
|
font.weight: Style.fontWeightBold
|
||||||
|
color: Colors.accentSecondary
|
||||||
|
}
|
||||||
|
NText {
|
||||||
|
text: "Coming soon"
|
||||||
|
color: Colors.textSecondary
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,17 @@ Item {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: Style.marginMedium * scaling
|
spacing: Style.marginMedium * scaling
|
||||||
NText { text: "Bar"; font.weight: Style.fontWeightBold; color: Colors.accentSecondary }
|
NText {
|
||||||
NText { text: "Coming soon"; color: Colors.textSecondary }
|
text: "Bar"
|
||||||
Item { Layout.fillHeight: true }
|
font.weight: Style.fontWeightBold
|
||||||
|
color: Colors.accentSecondary
|
||||||
|
}
|
||||||
|
NText {
|
||||||
|
text: "Coming soon"
|
||||||
|
color: Colors.textSecondary
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,17 @@ Item {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: Style.marginMedium * scaling
|
spacing: Style.marginMedium * scaling
|
||||||
NText { text: "Display"; font.weight: Style.fontWeightBold; color: Colors.accentSecondary }
|
NText {
|
||||||
NText { text: "Coming soon"; color: Colors.textSecondary }
|
text: "Display"
|
||||||
Item { Layout.fillHeight: true }
|
font.weight: Style.fontWeightBold
|
||||||
|
color: Colors.accentSecondary
|
||||||
|
}
|
||||||
|
NText {
|
||||||
|
text: "Coming soon"
|
||||||
|
color: Colors.textSecondary
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,11 @@ Item {
|
||||||
spacing: Style.marginMedium * scaling
|
spacing: Style.marginMedium * scaling
|
||||||
|
|
||||||
// Profile section
|
// Profile section
|
||||||
NText { text: "Profile"; font.weight: Style.fontWeightBold; color: Colors.accentSecondary }
|
NText {
|
||||||
|
text: "Profile"
|
||||||
|
font.weight: Style.fontWeightBold
|
||||||
|
color: Colors.accentSecondary
|
||||||
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
@ -50,8 +54,15 @@ Item {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
spacing: 2 * scaling
|
spacing: 2 * scaling
|
||||||
NText { text: "Profile Image"; color: Colors.textPrimary; font.weight: Style.fontWeightBold }
|
NText {
|
||||||
NText { text: "Your profile picture displayed in various places throughout the shell"; color: Colors.textSecondary }
|
text: "Profile Image"
|
||||||
|
color: Colors.textPrimary
|
||||||
|
font.weight: Style.fontWeightBold
|
||||||
|
}
|
||||||
|
NText {
|
||||||
|
text: "Your profile picture displayed in various places throughout the shell"
|
||||||
|
color: Colors.textSecondary
|
||||||
|
}
|
||||||
NTextBox {
|
NTextBox {
|
||||||
text: Settings.data.general.avatarImage
|
text: Settings.data.general.avatarImage
|
||||||
placeholderText: "/home/user/.face"
|
placeholderText: "/home/user/.face"
|
||||||
|
|
@ -61,33 +72,48 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NDivider { Layout.fillWidth: true; Layout.topMargin: Style.marginSmall * scaling; Layout.bottomMargin: Style.marginSmall * scaling }
|
NDivider {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: Style.marginSmall * scaling
|
||||||
|
Layout.bottomMargin: Style.marginSmall * scaling
|
||||||
|
}
|
||||||
|
|
||||||
// UI section
|
// UI section
|
||||||
NText { text: "User Interface"; font.weight: Style.fontWeightBold; color: Colors.accentSecondary }
|
NText {
|
||||||
|
text: "User Interface"
|
||||||
|
font.weight: Style.fontWeightBold
|
||||||
|
color: Colors.accentSecondary
|
||||||
|
}
|
||||||
|
|
||||||
NToggle {
|
NToggle {
|
||||||
label: "Show Corners"
|
label: "Show Corners"
|
||||||
description: "Display rounded corners on the edge of the screen"
|
description: "Display rounded corners on the edge of the screen"
|
||||||
value: Settings.data.general.showScreenCorners
|
value: Settings.data.general.showScreenCorners
|
||||||
onToggled: function (v) { Settings.data.general.showScreenCorners = v }
|
onToggled: function (v) {
|
||||||
|
Settings.data.general.showScreenCorners = v
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NToggle {
|
NToggle {
|
||||||
label: "Show Dock"
|
label: "Show Dock"
|
||||||
description: "Display a dock at the bottom of the screen for quick access to applications"
|
description: "Display a dock at the bottom of the screen for quick access to applications"
|
||||||
value: Settings.data.general.showDock
|
value: Settings.data.general.showDock
|
||||||
onToggled: function (v) { Settings.data.general.showDock = v }
|
onToggled: function (v) {
|
||||||
|
Settings.data.general.showDock = v
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NToggle {
|
NToggle {
|
||||||
label: "Dim Desktop"
|
label: "Dim Desktop"
|
||||||
description: "Dim the desktop when panels or menus are open"
|
description: "Dim the desktop when panels or menus are open"
|
||||||
value: Settings.data.general.dimDesktop
|
value: Settings.data.general.dimDesktop
|
||||||
onToggled: function (v) { Settings.data.general.dimDesktop = v }
|
onToggled: function (v) {
|
||||||
|
Settings.data.general.dimDesktop = v
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item { Layout.fillHeight: true }
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,17 @@ Item {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: Style.marginMedium * scaling
|
spacing: Style.marginMedium * scaling
|
||||||
NText { text: "Misc"; font.weight: Style.fontWeightBold; color: Colors.accentSecondary }
|
NText {
|
||||||
NText { text: "Coming soon"; color: Colors.textSecondary }
|
text: "Misc"
|
||||||
Item { Layout.fillHeight: true }
|
font.weight: Style.fontWeightBold
|
||||||
|
color: Colors.accentSecondary
|
||||||
|
}
|
||||||
|
NText {
|
||||||
|
text: "Coming soon"
|
||||||
|
color: Colors.textSecondary
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,17 @@ Item {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: Style.marginMedium * scaling
|
spacing: Style.marginMedium * scaling
|
||||||
NText { text: "Network"; font.weight: Style.fontWeightBold; color: Colors.accentSecondary }
|
NText {
|
||||||
NText { text: "Coming soon"; color: Colors.textSecondary }
|
text: "Network"
|
||||||
Item { Layout.fillHeight: true }
|
font.weight: Style.fontWeightBold
|
||||||
|
color: Colors.accentSecondary
|
||||||
|
}
|
||||||
|
NText {
|
||||||
|
text: "Coming soon"
|
||||||
|
color: Colors.textSecondary
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,17 @@ Item {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: Style.marginMedium * scaling
|
spacing: Style.marginMedium * scaling
|
||||||
NText { text: "Screen Recorder"; font.weight: Style.fontWeightBold; color: Colors.accentSecondary }
|
NText {
|
||||||
NText { text: "Coming soon"; color: Colors.textSecondary }
|
text: "Screen Recorder"
|
||||||
Item { Layout.fillHeight: true }
|
font.weight: Style.fontWeightBold
|
||||||
|
color: Colors.accentSecondary
|
||||||
|
}
|
||||||
|
NText {
|
||||||
|
text: "Coming soon"
|
||||||
|
color: Colors.textSecondary
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,17 @@ Item {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: Style.marginMedium * scaling
|
spacing: Style.marginMedium * scaling
|
||||||
NText { text: "Time & Weather"; font.weight: Style.fontWeightBold; color: Colors.accentSecondary }
|
NText {
|
||||||
NText { text: "Coming soon"; color: Colors.textSecondary }
|
text: "Time & Weather"
|
||||||
Item { Layout.fillHeight: true }
|
font.weight: Style.fontWeightBold
|
||||||
|
color: Colors.accentSecondary
|
||||||
|
}
|
||||||
|
NText {
|
||||||
|
text: "Coming soon"
|
||||||
|
color: Colors.textSecondary
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,17 @@ Item {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: Style.marginMedium * scaling
|
spacing: Style.marginMedium * scaling
|
||||||
NText { text: "Wallpaper"; font.weight: Style.fontWeightBold; color: Colors.accentSecondary }
|
NText {
|
||||||
NText { text: "Coming soon"; color: Colors.textSecondary }
|
text: "Wallpaper"
|
||||||
Item { Layout.fillHeight: true }
|
font.weight: Style.fontWeightBold
|
||||||
|
color: Colors.accentSecondary
|
||||||
|
}
|
||||||
|
NText {
|
||||||
|
text: "Coming soon"
|
||||||
|
color: Colors.textSecondary
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue