diff --git a/Modules/Bar/Bar.qml b/Modules/Bar/Bar.qml index dfcb721..ad783af 100644 --- a/Modules/Bar/Bar.qml +++ b/Modules/Bar/Bar.qml @@ -77,7 +77,7 @@ Variants { "screen": root.modelData || null, "scaling": ScalingService.getScreenScale(screen), "widgetId": modelData.id, - "barSection": parent.objectName, + "section": parent.objectName.replace("Section", "").toLowerCase(), "sectionWidgetIndex": index, "sectionWidgetsCount": Settings.data.bar.widgets.left.length } @@ -105,7 +105,7 @@ Variants { "screen": root.modelData || null, "scaling": ScalingService.getScreenScale(screen), "widgetId": modelData.id, - "barSection": parent.objectName, + "section": parent.objectName.replace("Section", "").toLowerCase(), "sectionWidgetIndex": index, "sectionWidgetsCount": Settings.data.bar.widgets.center.length } @@ -134,7 +134,7 @@ Variants { "screen": root.modelData || null, "scaling": ScalingService.getScreenScale(screen), "widgetId": modelData.id, - "barSection": parent.objectName, + "section": parent.objectName.replace("Section", "").toLowerCase(), "sectionWidgetIndex": index, "sectionWidgetsCount": Settings.data.bar.widgets.right.length } diff --git a/Modules/Bar/Widgets/ActiveWindow.qml b/Modules/Bar/Widgets/ActiveWindow.qml index a42f982..d3fb762 100644 --- a/Modules/Bar/Widgets/ActiveWindow.qml +++ b/Modules/Bar/Widgets/ActiveWindow.qml @@ -15,13 +15,12 @@ RowLayout { // 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) { diff --git a/Modules/Bar/Widgets/Battery.qml b/Modules/Bar/Widgets/Battery.qml index c76722d..a718868 100644 --- a/Modules/Bar/Widgets/Battery.qml +++ b/Modules/Bar/Widgets/Battery.qml @@ -14,13 +14,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) { diff --git a/Modules/Bar/Widgets/Brightness.qml b/Modules/Bar/Widgets/Brightness.qml index 4d8107b..9a81997 100644 --- a/Modules/Bar/Widgets/Brightness.qml +++ b/Modules/Bar/Widgets/Brightness.qml @@ -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) { diff --git a/Modules/Bar/Widgets/Clock.qml b/Modules/Bar/Widgets/Clock.qml index 2c2c9ed..fd37ce0 100644 --- a/Modules/Bar/Widgets/Clock.qml +++ b/Modules/Bar/Widgets/Clock.qml @@ -13,13 +13,12 @@ Rectangle { // 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) { diff --git a/Modules/Bar/Widgets/CustomButton.qml b/Modules/Bar/Widgets/CustomButton.qml index c233ff0..f80f8ba 100644 --- a/Modules/Bar/Widgets/CustomButton.qml +++ b/Modules/Bar/Widgets/CustomButton.qml @@ -15,13 +15,12 @@ NIconButton { // 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) { diff --git a/Modules/Bar/Widgets/KeyboardLayout.qml b/Modules/Bar/Widgets/KeyboardLayout.qml index 74ef083..aff5cdc 100644 --- a/Modules/Bar/Widgets/KeyboardLayout.qml +++ b/Modules/Bar/Widgets/KeyboardLayout.qml @@ -15,13 +15,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) { diff --git a/Modules/Bar/Widgets/MediaMini.qml b/Modules/Bar/Widgets/MediaMini.qml index 8d48a85..ae68eff 100644 --- a/Modules/Bar/Widgets/MediaMini.qml +++ b/Modules/Bar/Widgets/MediaMini.qml @@ -15,13 +15,12 @@ RowLayout { // 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) { diff --git a/Modules/Bar/Widgets/Microphone.qml b/Modules/Bar/Widgets/Microphone.qml index 24156bb..fe671f9 100644 --- a/Modules/Bar/Widgets/Microphone.qml +++ b/Modules/Bar/Widgets/Microphone.qml @@ -15,13 +15,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) { diff --git a/Modules/Bar/Widgets/NotificationHistory.qml b/Modules/Bar/Widgets/NotificationHistory.qml index aca0da0..3737242 100644 --- a/Modules/Bar/Widgets/NotificationHistory.qml +++ b/Modules/Bar/Widgets/NotificationHistory.qml @@ -15,13 +15,12 @@ NIconButton { // 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) { diff --git a/Modules/Bar/Widgets/SidePanelToggle.qml b/Modules/Bar/Widgets/SidePanelToggle.qml index 66eaf01..80855cf 100644 --- a/Modules/Bar/Widgets/SidePanelToggle.qml +++ b/Modules/Bar/Widgets/SidePanelToggle.qml @@ -14,13 +14,12 @@ NIconButton { // 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) { diff --git a/Modules/Bar/Widgets/Spacer.qml b/Modules/Bar/Widgets/Spacer.qml index fcb8cfe..8f1378e 100644 --- a/Modules/Bar/Widgets/Spacer.qml +++ b/Modules/Bar/Widgets/Spacer.qml @@ -14,13 +14,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) { diff --git a/Modules/Bar/Widgets/SystemMonitor.qml b/Modules/Bar/Widgets/SystemMonitor.qml index 788b541..9141858 100644 --- a/Modules/Bar/Widgets/SystemMonitor.qml +++ b/Modules/Bar/Widgets/SystemMonitor.qml @@ -13,13 +13,12 @@ RowLayout { // 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) { diff --git a/Modules/Bar/Widgets/Volume.qml b/Modules/Bar/Widgets/Volume.qml index c0bf407..7b08046 100644 --- a/Modules/Bar/Widgets/Volume.qml +++ b/Modules/Bar/Widgets/Volume.qml @@ -15,13 +15,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) { diff --git a/Modules/Bar/Widgets/Workspace.qml b/Modules/Bar/Widgets/Workspace.qml index d8bb543..9c216fb 100644 --- a/Modules/Bar/Widgets/Workspace.qml +++ b/Modules/Bar/Widgets/Workspace.qml @@ -16,13 +16,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) { diff --git a/Services/BarWidgetRegistry.qml b/Services/BarWidgetRegistry.qml index b67c769..a1a61bc 100644 --- a/Services/BarWidgetRegistry.qml +++ b/Services/BarWidgetRegistry.qml @@ -206,9 +206,9 @@ Singleton { function getNPillDirection(widget) { try { - if (widget.barSection === "leftSection") { + if (widget.section === "left") { return true - } else if (widget.barSection === "rightSection") { + } else if (widget.section === "right") { return false } else { // middle section