nsection-editor: better "move" icons for bar widget sections and control center shortcuts sections

This commit is contained in:
Lemmy
2026-01-27 21:57:16 -05:00
parent 795b77b8cd
commit 4af8c1dc2b
2 changed files with 13 additions and 0 deletions
@@ -20,6 +20,10 @@ ColumnLayout {
signal openPluginSettings(var manifest)
function getSectionIcons() {
return {"left": "arrow-bar-to-up", "center": "layout-distribute-horizontal", "right": "arrow-bar-to-down"};
}
NText {
text: I18n.tr("panels.bar.widgets-desc")
wrapMode: Text.WordWrap
@@ -33,6 +37,7 @@ ColumnLayout {
settingsDialogComponent: Qt.resolvedUrl(Quickshell.shellDir + "/Modules/Panels/Settings/Bar/BarWidgetSettingsDialog.qml")
widgetRegistry: BarWidgetRegistry
widgetModel: Settings.data.bar.widgets.left
sectionIcons: root.getSectionIcons()
availableWidgets: root.availableWidgets
onAddWidget: (widgetId, section) => root.addWidgetToSection(widgetId, section)
onRemoveWidget: (section, index) => root.removeWidgetFromSection(section, index)
@@ -49,6 +54,7 @@ ColumnLayout {
settingsDialogComponent: Qt.resolvedUrl(Quickshell.shellDir + "/Modules/Panels/Settings/Bar/BarWidgetSettingsDialog.qml")
widgetRegistry: BarWidgetRegistry
widgetModel: Settings.data.bar.widgets.center
sectionIcons: root.getSectionIcons()
availableWidgets: root.availableWidgets
onAddWidget: (widgetId, section) => root.addWidgetToSection(widgetId, section)
onRemoveWidget: (section, index) => root.removeWidgetFromSection(section, index)
@@ -65,6 +71,7 @@ ColumnLayout {
settingsDialogComponent: Qt.resolvedUrl(Quickshell.shellDir + "/Modules/Panels/Settings/Bar/BarWidgetSettingsDialog.qml")
widgetRegistry: BarWidgetRegistry
widgetModel: Settings.data.bar.widgets.right
sectionIcons: root.getSectionIcons()
availableWidgets: root.availableWidgets
onAddWidget: (widgetId, section) => root.addWidgetToSection(widgetId, section)
onRemoveWidget: (section, index) => root.removeWidgetFromSection(section, index)
@@ -22,6 +22,10 @@ ColumnLayout {
signal moveWidgetBetweenSections(string fromSection, int index, string toSection)
signal openPluginSettingsRequested(var manifest)
function getSectionIcons() {
return {"left": "arrow-bar-to-up", "right": "arrow-bar-to-down"};
}
// Widgets Management Section
ColumnLayout {
spacing: Style.marginXXS
@@ -42,6 +46,7 @@ ColumnLayout {
maxWidgets: Settings.data.controlCenter.shortcuts["right"].length > 5 ? 0 : (Settings.data.controlCenter.shortcuts["right"].length > 0 ? 5 : 10)
widgetRegistry: ControlCenterWidgetRegistry
widgetModel: Settings.data.controlCenter.shortcuts["left"]
sectionIcons: root.getSectionIcons()
availableWidgets: root.availableWidgets
availableSections: ["left", "right"]
onAddWidget: (widgetId, section) => root.addWidgetToSection(widgetId, section)
@@ -60,6 +65,7 @@ ColumnLayout {
maxWidgets: Settings.data.controlCenter.shortcuts["left"].length > 5 ? 0 : (Settings.data.controlCenter.shortcuts["left"].length > 0 ? 5 : 10)
widgetRegistry: ControlCenterWidgetRegistry
widgetModel: Settings.data.controlCenter.shortcuts["right"]
sectionIcons: root.getSectionIcons()
availableWidgets: root.availableWidgets
availableSections: ["left", "right"]
onAddWidget: (widgetId, section) => root.addWidgetToSection(widgetId, section)