From 1288924f87e6b015573929932151079fb54455d3 Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Thu, 13 Nov 2025 09:16:52 -0500 Subject: [PATCH] Dragging: removed a lot of dead code since we no longer support panel dragging. --- Modules/Panels/Settings/Tabs/BarTab.qml | 22 --------------- .../Panels/Settings/Tabs/ControlCenterTab.qml | 26 ----------------- .../Panels/Settings/Tabs/SessionMenuTab.qml | 28 ------------------- 3 files changed, 76 deletions(-) diff --git a/Modules/Panels/Settings/Tabs/BarTab.qml b/Modules/Panels/Settings/Tabs/BarTab.qml index 5e0c2fad..f39d11a9 100644 --- a/Modules/Panels/Settings/Tabs/BarTab.qml +++ b/Modules/Panels/Settings/Tabs/BarTab.qml @@ -24,22 +24,6 @@ ColumnLayout { }) } - // Handler for drag start - disables panel background clicks - function handleDragStart() { - var panel = PanelService.getPanel("settingsPanel", screen) - if (panel && panel.disableBackgroundClick) { - panel.disableBackgroundClick() - } - } - - // Handler for drag end - re-enables panel background clicks - function handleDragEnd() { - var panel = PanelService.getPanel("settingsPanel", screen) - if (panel && panel.enableBackgroundClick) { - panel.enableBackgroundClick() - } - } - NHeader { label: I18n.tr("settings.bar.appearance.section.label") description: I18n.tr("settings.bar.appearance.section.description") @@ -234,8 +218,6 @@ ColumnLayout { onReorderWidget: (section, fromIndex, toIndex) => _reorderWidgetInSection(section, fromIndex, toIndex) onUpdateWidgetSettings: (section, index, settings) => _updateWidgetSettingsInSection(section, index, settings) onMoveWidget: (fromSection, index, toSection) => _moveWidgetBetweenSections(fromSection, index, toSection) - onDragPotentialStarted: root.handleDragStart() - onDragPotentialEnded: root.handleDragEnd() } // Center Section @@ -251,8 +233,6 @@ ColumnLayout { onReorderWidget: (section, fromIndex, toIndex) => _reorderWidgetInSection(section, fromIndex, toIndex) onUpdateWidgetSettings: (section, index, settings) => _updateWidgetSettingsInSection(section, index, settings) onMoveWidget: (fromSection, index, toSection) => _moveWidgetBetweenSections(fromSection, index, toSection) - onDragPotentialStarted: root.handleDragStart() - onDragPotentialEnded: root.handleDragEnd() } // Right Section @@ -268,8 +248,6 @@ ColumnLayout { onReorderWidget: (section, fromIndex, toIndex) => _reorderWidgetInSection(section, fromIndex, toIndex) onUpdateWidgetSettings: (section, index, settings) => _updateWidgetSettingsInSection(section, index, settings) onMoveWidget: (fromSection, index, toSection) => _moveWidgetBetweenSections(fromSection, index, toSection) - onDragPotentialStarted: root.handleDragStart() - onDragPotentialEnded: root.handleDragEnd() } } } diff --git a/Modules/Panels/Settings/Tabs/ControlCenterTab.qml b/Modules/Panels/Settings/Tabs/ControlCenterTab.qml index 989f56e7..6cdfc69b 100644 --- a/Modules/Panels/Settings/Tabs/ControlCenterTab.qml +++ b/Modules/Panels/Settings/Tabs/ControlCenterTab.qml @@ -38,22 +38,6 @@ ColumnLayout { "required": false }] - // Handler for drag start - disables panel background clicks - function handleDragStart() { - var panel = PanelService.getPanel("settingsPanel", screen) - if (panel && panel.disableBackgroundClick) { - panel.disableBackgroundClick() - } - } - - // Handler for drag end - re-enables panel background clicks - function handleDragEnd() { - var panel = PanelService.getPanel("settingsPanel", screen) - if (panel && panel.enableBackgroundClick) { - panel.enableBackgroundClick() - } - } - function saveCards() { var toSave = [] for (var i = 0; i < cardsModel.length; i++) { @@ -202,12 +186,6 @@ ColumnLayout { Layout.fillWidth: true model: cardsModel disabledIds: Settings.data.location.weatherEnabled ? [] : ["weather-card"] - onDragPotentialStarted: { - root.handleDragStart() - } - onDragPotentialEnded: { - root.handleDragEnd() - } onItemToggled: function (index, enabled) { //Logger.i("ControlCenterTab", "Item", index, "toggled to", enabled) var newModel = cardsModel.slice() @@ -266,8 +244,6 @@ ColumnLayout { onReorderWidget: (section, fromIndex, toIndex) => _reorderWidgetInSection(section, fromIndex, toIndex) onUpdateWidgetSettings: (section, index, settings) => _updateWidgetSettingsInSection(section, index, settings) onMoveWidget: (fromSection, index, toSection) => _moveWidgetBetweenSections(fromSection, index, toSection) - onDragPotentialStarted: root.handleDragStart() - onDragPotentialEnded: root.handleDragEnd() } // Right @@ -285,8 +261,6 @@ ColumnLayout { onReorderWidget: (section, fromIndex, toIndex) => _reorderWidgetInSection(section, fromIndex, toIndex) onUpdateWidgetSettings: (section, index, settings) => _updateWidgetSettingsInSection(section, index, settings) onMoveWidget: (fromSection, index, toSection) => _moveWidgetBetweenSections(fromSection, index, toSection) - onDragPotentialStarted: root.handleDragStart() - onDragPotentialEnded: root.handleDragEnd() } } } diff --git a/Modules/Panels/Settings/Tabs/SessionMenuTab.qml b/Modules/Panels/Settings/Tabs/SessionMenuTab.qml index 184f2cba..4301cde0 100644 --- a/Modules/Panels/Settings/Tabs/SessionMenuTab.qml +++ b/Modules/Panels/Settings/Tabs/SessionMenuTab.qml @@ -39,28 +39,6 @@ ColumnLayout { "required": false }] - // Handler for drag start - disables panel background clicks - function handleDragStart() { - var currentScreen = Quickshell.screens && Quickshell.screens.length > 0 ? Quickshell.screens[0] : null - if (currentScreen) { - var panel = PanelService.getPanel("settingsPanel", currentScreen) - if (panel && panel.disableBackgroundClick) { - panel.disableBackgroundClick() - } - } - } - - // Handler for drag end - re-enables panel background clicks - function handleDragEnd() { - var currentScreen = Quickshell.screens && Quickshell.screens.length > 0 ? Quickshell.screens[0] : null - if (currentScreen) { - var panel = PanelService.getPanel("settingsPanel", currentScreen) - if (panel && panel.enableBackgroundClick) { - panel.enableBackgroundClick() - } - } - } - function saveEntries() { var toSave = [] for (var i = 0; i < entriesModel.length; i++) { @@ -201,12 +179,6 @@ ColumnLayout { Layout.fillWidth: true model: entriesModel disabledIds: [] - onDragPotentialStarted: { - root.handleDragStart() - } - onDragPotentialEnded: { - root.handleDragEnd() - } onItemToggled: function (index, enabled) { var newModel = entriesModel.slice() newModel[index] = Object.assign({}, newModel[index], {