Renamed all tabs qml, so its easier to distinguish them from services

This commit is contained in:
quadbyte 2025-08-14 23:57:18 -04:00
parent eac335ab95
commit 39cc72f067
13 changed files with 80 additions and 22 deletions

View file

@ -318,17 +318,17 @@ NLoader {
Layout.fillHeight: true
currentIndex: currentTabIndex
Tabs.General {}
Tabs.Bar {}
Tabs.Audio {}
Tabs.Display {}
Tabs.Network {}
Tabs.TimeWeather {}
Tabs.ColorScheme {}
Tabs.Wallpaper {}
Tabs.WallpaperSelector {}
Tabs.ScreenRecorder {}
Tabs.About {}
Tabs.GeneralTab {}
Tabs.BarTab {}
Tabs.AudioTab {}
Tabs.DisplayTab {}
Tabs.NetworkTab {}
Tabs.TimeWeatherTab {}
Tabs.ColorSchemeTab {}
Tabs.WallpaperTab {}
Tabs.WallpaperSelectorTab {}
Tabs.ScreenRecorderTab {}
Tabs.AboutTab {}
}
}
}

View file

@ -9,6 +9,12 @@ ColumnLayout {
spacing: 0
// Component.onCompleted: {
// console.log("[ColorSchemes] Service initialized")
// ColorScheme.loadColorSchemes()
// }
// property var colorSchemes: [{
// "label": "Generated from Wallpaper (Matugen required)"
// }, {
@ -24,7 +30,6 @@ ColumnLayout {
// "label": "Rosé Pine",
// "file": "rosepine.json"
// }]
ScrollView {
id: scrollView
@ -56,18 +61,22 @@ ColumnLayout {
}
ButtonGroup {
id: schemes
id: schemesGroup
}
// Repeater {
// model: root.colorSchemes
// ButtonGroup.group: schemes
// NRadioButton {
// // checked: Audio.sink?.id === modelData.id
// //onClicked: Audio.setAudioSink(modelData)
// text: modelData.label
// }
// }
Repeater {
model: ColorSchemes.schemes
delegate: NRadioButton {
ButtonGroup.group: schemesGroup
// checked: Audio.sink?.id === modelData.id
//onClicked: Audio.setAudioSink(modelData)
text: {
console.log(modelData.fileName)
return modelData.fileName
}
}
}
}
}
}

49
Services/ColorSchemes.qml Normal file
View file

@ -0,0 +1,49 @@
pragma Singleton
import QtQuick
import Qt.labs.folderlistmodel
import Quickshell
import Quickshell.Io
Singleton {
id: root
// Component.onCompleted: {
// console.log("[ColorSchemes] Service initialized")
// loadColorSchemes()
// }
// property var schemes: []
// //property string currentScheme: Settings.data.wallpaper.current
// property bool scanning: false
// function loadColorSchemes() {
// scanning = true
// schemes = []
// // Unsetting, then setting the folder will re-trigger the parsing!
// folderModel.folder = ""
// folderModel.folder = "file://" + Quickshell.shellDir + "/Assets/Matugen/ColorSchemes"
// }
// FolderListModel {
// id: folderModel
// nameFilters: ["*.json"]
// showDirs: false
// sortField: FolderListModel.Name
// onStatusChanged: {
// console.log("sasfjsaflkhfkjhasf")
// if (status === FolderListModel.Ready) {
// var files = []
// for (var i = 0; i < count; i++) {
// console.log(get(i, "fileName"))
// // var filepath = (Settings.data.wallpaper.directory !== undefined ? Settings.data.wallpaper.directory : "") + "/" + get(
// // i, "fileName")
// // files.push(filepath)
// }
// schemes = files
// scanning = false
// console.log(schemes)
// }
// }
// }
}