diff --git a/Modules/Bar/Widgets/SystemMonitor.qml b/Modules/Bar/Widgets/SystemMonitor.qml index 0ad06912..691d08c1 100644 --- a/Modules/Bar/Widgets/SystemMonitor.qml +++ b/Modules/Bar/Widgets/SystemMonitor.qml @@ -352,14 +352,7 @@ Rectangle { acceptedButtons: Qt.RightButton onClicked: { var settingsPanel = PanelService.getPanel("settingsPanel") - settingsPanel.requestedTab = SettingsPanel.Tab.Bar - settingsPanel.requestedWidgetSettings = { - "widgetIndex": root.sectionWidgetIndex, - "widgetData": root.widgetSettings, - "widgetId": root.widgetId, - "sectionId": root.section - } - settingsPanel.open() + settingsPanel.openWidgetSettings(root.section, root.sectionWidgetIndex, root.widgetId, root.widgetSettings) } } } diff --git a/Modules/Settings/SettingsPanel.qml b/Modules/Settings/SettingsPanel.qml index 15661f91..3a0962c7 100644 --- a/Modules/Settings/SettingsPanel.qml +++ b/Modules/Settings/SettingsPanel.qml @@ -240,6 +240,17 @@ NPanel { root.currentTabIndex = initialIndex } + function openWidgetSettings(section, widgetIndex, widgetId, widgetData) { + settingsPanel.requestedWidgetSettings = { + "sectionId": section, + "widgetIndex": widgetIndex, + "widgetId": widgetId, + "widgetData": widgetData + } + settingsPanel.requestedTab = SettingsPanel.Tab.Bar + settingsPanel.open() + } + // Add scroll functions function scrollDown() { if (activeScrollView && activeScrollView.ScrollBar.vertical) {