mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 13:32:50 -05:00
dankbar: improve config reactivity
This commit is contained in:
@@ -106,18 +106,27 @@ Item {
|
||||
Repeater {
|
||||
id: dankBarRepeater
|
||||
model: ScriptModel {
|
||||
values: SettingsData.barConfigs
|
||||
id: barRepeaterModel
|
||||
values: {
|
||||
const configs = SettingsData.barConfigs;
|
||||
return configs.map(c => ({
|
||||
id: c.id,
|
||||
position: c.position
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
property var hyprlandOverviewLoaderRef: hyprlandOverviewLoader
|
||||
|
||||
delegate: Loader {
|
||||
id: barLoader
|
||||
active: modelData.enabled
|
||||
required property var modelData
|
||||
property var barConfig: SettingsData.getBarConfig(modelData.id)
|
||||
active: barConfig?.enabled ?? false
|
||||
asynchronous: false
|
||||
|
||||
sourceComponent: DankBar {
|
||||
barConfig: modelData
|
||||
barConfig: barLoader.barConfig
|
||||
hyprlandOverviewLoader: dankBarRepeater.hyprlandOverviewLoaderRef
|
||||
|
||||
onColorPickerRequested: {
|
||||
|
||||
Reference in New Issue
Block a user