Files
DankMaterialShell/quickshell/Modals/WindowRuleModal.qml
T
bbedward ccbf1d38ad widgets: bump qml-common, rename Dank* prefixed widgets to D, add
deprecation notice to plugin compatibility shims

- When qml-common became a thing, we left qs.Widgets shims in place for
  plugin compatibility
- It's annoying to need to maintain them when qml-common has any change,
  add a warning so we can safely deprecate them in the future
- One shot rename the common stuff to D to make it shorter and nicer to
  write
2026-10-05 16:47:19 -04:00

58 lines
1.2 KiB
QML

import QtQuick
import QtQuick.Window
import qs.Common
import qs.Modules.Settings
import qs.Modules.Settings.Widgets
import qs.DCommon.Widgets
import qs.Widgets
DankFloatingWindow {
id: root
signal ruleSubmitted
objectName: "windowRuleModal"
title: editor.title
minimumSize: Qt.size(Math.min(SettingsMetrics.formDialogWidth + Theme.spacingL * 2, Screen.width), Math.min(Math.round(Theme.fontSizeMedium * 52), Screen.height))
maximumSize: minimumSize
visible: false
onClosed: hide()
function show(window) {
visible = true;
editor.show(window);
}
function showEdit(rule) {
visible = true;
editor.showEdit(rule);
}
function showCopy(rule) {
visible = true;
editor.showCopy(rule);
}
function hide() {
editor.opened = false;
visible = false;
}
WindowRuleEditorDialog {
id: editor
anchors.fill: parent
windowControls: ruleWindowControls
onRejected: root.hide()
onRuleSubmitted: {
root.ruleSubmitted();
root.hide();
}
}
FloatingWindowControls {
id: ruleWindowControls
targetWindow: root
}
}