BaBar Widgets: pass a proper section name instead of a longer string.

This commit is contained in:
LemmyCook 2025-09-12 12:54:09 -04:00
parent 28677d6888
commit 380f31fbd9
16 changed files with 19 additions and 33 deletions

View file

@ -13,13 +13,12 @@ Item {
// Widget properties passed from Bar.qml for per-instance settings
property string widgetId: ""
property string barSection: ""
property string section: ""
property int sectionWidgetIndex: -1
property int sectionWidgetsCount: 0
property var widgetMetadata: BarWidgetRegistry.widgetMetadata[widgetId]
property var widgetSettings: {
var section = barSection.replace("Section", "").toLowerCase()
if (section && sectionWidgetIndex >= 0) {
var widgets = Settings.data.bar.widgets[section]
if (widgets && sectionWidgetIndex < widgets.length) {