1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-05-12 07:19:41 -04:00

quickshell: drop support for 0.2, require 0.3+

- Remove all compat code
- Rewire LegacyNetworkService to use Quickshell.Networking
- Add parentWindow to settings child windows
This commit is contained in:
bbedward
2026-05-11 13:04:29 -04:00
parent 3989c7f801
commit b8f4c350a8
52 changed files with 1472 additions and 2064 deletions

View File

@@ -41,17 +41,8 @@ Item {
property string _actionType: ""
property bool addingNewKey: false
property bool useCustomCompositor: false
property var _shortcutInhibitor: null
property bool _altShiftGhost: false
readonly property bool _shortcutInhibitorAvailable: {
try {
return typeof ShortcutInhibitor !== "undefined";
} catch (e) {
return false;
}
}
readonly property var keys: bindData.keys || []
readonly property bool hasOverride: {
for (var i = 0; i < keys.length; i++) {
@@ -251,41 +242,17 @@ Item {
addingNewKey = false;
}
function _createShortcutInhibitor() {
if (!_shortcutInhibitorAvailable || _shortcutInhibitor)
return;
const qmlString = `
import QtQuick
import Quickshell.Wayland
ShortcutInhibitor {
enabled: false
window: null
}
`;
_shortcutInhibitor = Qt.createQmlObject(qmlString, root, "KeybindItem.ShortcutInhibitor");
_shortcutInhibitor.enabled = Qt.binding(() => root.recording);
_shortcutInhibitor.window = Qt.binding(() => root.panelWindow);
}
function _destroyShortcutInhibitor() {
if (_shortcutInhibitor) {
_shortcutInhibitor.enabled = false;
_shortcutInhibitor.destroy();
_shortcutInhibitor = null;
}
ShortcutInhibitor {
window: root.panelWindow
enabled: root.recording
}
function startRecording() {
_destroyShortcutInhibitor();
_createShortcutInhibitor();
recording = true;
}
function stopRecording() {
recording = false;
_destroyShortcutInhibitor();
}
Column {