mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
settings: fix child windows on newer quickshell-git
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
@@ -916,14 +917,28 @@ Item {
|
||||
});
|
||||
}
|
||||
|
||||
WidgetSelectionPopup {
|
||||
id: widgetSelectionPopup
|
||||
parentModal: widgetsTab.parentModal
|
||||
onWidgetSelected: (widgetId, targetSection) => {
|
||||
widgetsTab.addWidgetToSection(widgetId, targetSection);
|
||||
LazyLoader {
|
||||
id: widgetSelectionPopupLoader
|
||||
active: false
|
||||
|
||||
WidgetSelectionPopup {
|
||||
id: widgetSelectionPopupItem
|
||||
parentModal: widgetsTab.parentModal
|
||||
onWidgetSelected: (widgetId, targetSection) => {
|
||||
widgetsTab.addWidgetToSection(widgetId, targetSection);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function showWidgetSelectionPopup(sectionId) {
|
||||
widgetSelectionPopupLoader.active = true;
|
||||
if (!widgetSelectionPopupLoader.item)
|
||||
return;
|
||||
widgetSelectionPopupLoader.item.targetSection = sectionId;
|
||||
widgetSelectionPopupLoader.item.allWidgets = widgetsTab.getWidgetsForPopup();
|
||||
widgetSelectionPopupLoader.item.show();
|
||||
}
|
||||
|
||||
DankFlickable {
|
||||
anchors.fill: parent
|
||||
clip: true
|
||||
@@ -1113,9 +1128,7 @@ Item {
|
||||
widgetsTab.handleItemOrderChanged(sectionId, newOrder);
|
||||
}
|
||||
onAddWidget: sectionId => {
|
||||
widgetSelectionPopup.targetSection = sectionId;
|
||||
widgetSelectionPopup.allWidgets = widgetsTab.getWidgetsForPopup();
|
||||
widgetSelectionPopup.show();
|
||||
showWidgetSelectionPopup(sectionId);
|
||||
}
|
||||
onRemoveWidget: (sectionId, index) => {
|
||||
widgetsTab.removeWidgetFromSection(sectionId, index);
|
||||
@@ -1170,9 +1183,7 @@ Item {
|
||||
widgetsTab.handleItemOrderChanged(sectionId, newOrder);
|
||||
}
|
||||
onAddWidget: sectionId => {
|
||||
widgetSelectionPopup.targetSection = sectionId;
|
||||
widgetSelectionPopup.allWidgets = widgetsTab.getWidgetsForPopup();
|
||||
widgetSelectionPopup.show();
|
||||
showWidgetSelectionPopup(sectionId);
|
||||
}
|
||||
onRemoveWidget: (sectionId, index) => {
|
||||
widgetsTab.removeWidgetFromSection(sectionId, index);
|
||||
@@ -1227,9 +1238,7 @@ Item {
|
||||
widgetsTab.handleItemOrderChanged(sectionId, newOrder);
|
||||
}
|
||||
onAddWidget: sectionId => {
|
||||
widgetSelectionPopup.targetSection = sectionId;
|
||||
widgetSelectionPopup.allWidgets = widgetsTab.getWidgetsForPopup();
|
||||
widgetSelectionPopup.show();
|
||||
showWidgetSelectionPopup(sectionId);
|
||||
}
|
||||
onRemoveWidget: (sectionId, index) => {
|
||||
widgetsTab.removeWidgetFromSection(sectionId, index);
|
||||
|
||||
Reference in New Issue
Block a user