SettingsPanel: new method "openWidgetSettings"

This commit is contained in:
ItsLemmy
2025-10-21 20:57:58 -04:00
parent d820116a06
commit 6557b683ea
2 changed files with 12 additions and 8 deletions
+1 -8
View File
@@ -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)
}
}
}
+11
View File
@@ -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) {