mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-16 16:24:00 -04:00
ui: rename internal widgets with D prefix to match qml-common change
This commit is contained in:
+1
-1
Submodule dank-qml-common updated: e9ec233200...b5b7639693
Generated
+3
-3
@@ -3,11 +3,11 @@
|
||||
"dank-qml-common": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1791232364,
|
||||
"narHash": "sha256-pecYGeFoTFbCxS2ip9vBvrPaVhN7J5+e16GJUKwg2r8=",
|
||||
"lastModified": 1791237894,
|
||||
"narHash": "sha256-O2Gsf++QDSD7GHXGitFHvHKW+5jaYkTwKZb40U7EB2U=",
|
||||
"owner": "AvengeMedia",
|
||||
"repo": "dank-qml-common",
|
||||
"rev": "e9ec2332004ca2e8b248bbe8fc96971f5df6b824",
|
||||
"rev": "b5b7639693b2c83f0f97ddd2af3d60d559174846",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -9,10 +9,10 @@ import qs.Modals.Clipboard
|
||||
import qs.Modals.Common
|
||||
import qs.Modals.Greeter
|
||||
import qs.Modals.Settings
|
||||
import qs.Modals.DankLauncherV2
|
||||
import qs.Modals.DLauncherV2
|
||||
import qs.Modules
|
||||
import qs.Modules.AppDrawer
|
||||
import qs.Modules.DankDash
|
||||
import qs.Modules.DDash
|
||||
import qs.Modules.ControlCenter
|
||||
import qs.Modules.Dock
|
||||
import qs.Modules.Lock
|
||||
@@ -22,7 +22,7 @@ import qs.Widgets
|
||||
import qs.Modules.Notifications.Popup
|
||||
import qs.Modules.OSD
|
||||
import qs.Modules.ProcessList
|
||||
import qs.Modules.DankBar.Popouts
|
||||
import qs.Modules.DBar.Popouts
|
||||
import qs.Modules.WorkspaceOverlays
|
||||
import qs.Modules.Settings.DisplayConfig
|
||||
import qs.Services
|
||||
@@ -300,7 +300,7 @@ Item {
|
||||
}
|
||||
|
||||
sourceComponent: Component {
|
||||
DankDashPopout {
|
||||
DDashPopout {
|
||||
id: dankDashPopout
|
||||
|
||||
onPopoutClosed: PopoutService._scheduleUnload("dankDash")
|
||||
@@ -746,7 +746,7 @@ Item {
|
||||
PopoutService.dankLauncherV2ModalLoader = dankLauncherV2ModalLoader;
|
||||
}
|
||||
|
||||
DankLauncherV2Modal {
|
||||
DLauncherV2Modal {
|
||||
id: dankLauncherV2Modal
|
||||
|
||||
Component.onCompleted: {
|
||||
@@ -765,7 +765,7 @@ Item {
|
||||
PopoutService.spotlightBarModalLoader = spotlightBarModalLoader;
|
||||
}
|
||||
|
||||
DankLauncherV2ModalHost {
|
||||
DLauncherV2ModalHost {
|
||||
id: spotlightBarModal
|
||||
connected: false
|
||||
spotlight: true
|
||||
@@ -1053,7 +1053,7 @@ Item {
|
||||
id: notepadSlideoutVariants
|
||||
model: SettingsData.getFilteredScreens("notepad")
|
||||
|
||||
delegate: DankSlideout {
|
||||
delegate: DSlideout {
|
||||
id: notepadSlideout
|
||||
title: I18n.tr("Notepad")
|
||||
slideoutWidth: 480
|
||||
|
||||
@@ -4,7 +4,7 @@ import Quickshell.Wayland
|
||||
import Quickshell.Services.SystemTray
|
||||
import Quickshell.Services.UPower
|
||||
import qs.Common
|
||||
import qs.Modules.DankDash
|
||||
import qs.Modules.DDash
|
||||
import qs.Services
|
||||
import qs.Modules.Settings.DisplayConfig
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@ import QtQuick
|
||||
import Quickshell
|
||||
import qs.Common
|
||||
import qs.Modals.Common
|
||||
import qs.Modals.DankLauncherV2.Components
|
||||
import qs.Modals.DLauncherV2.Components
|
||||
import qs.DCommon.Widgets
|
||||
import qs.Services
|
||||
|
||||
DankModal {
|
||||
DModal {
|
||||
id: root
|
||||
readonly property var log: Log.scoped("AppPickerModal")
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import qs.Modals.Common
|
||||
import qs.Services
|
||||
import qs.DCommon.Widgets
|
||||
|
||||
DankModal {
|
||||
DModal {
|
||||
id: root
|
||||
readonly property var log: Log.scoped("BluetoothPairingModal")
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import qs.Services
|
||||
import qs.DCommon.Widgets
|
||||
import qs.Widgets
|
||||
|
||||
DankFloatingWindow {
|
||||
DFloatingWindow {
|
||||
id: root
|
||||
|
||||
readonly property int modalWidth: 680
|
||||
|
||||
@@ -184,7 +184,7 @@ Item {
|
||||
Component {
|
||||
id: filterMenuComponent
|
||||
|
||||
DankDropdown {
|
||||
DDropdown {
|
||||
showTrigger: false
|
||||
popupAnchorItem: filterButton
|
||||
popupWidth: 180
|
||||
|
||||
@@ -3,7 +3,7 @@ import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
DankContextMenu {
|
||||
DContextMenu {
|
||||
id: root
|
||||
|
||||
property var entry: null
|
||||
|
||||
@@ -6,7 +6,7 @@ import qs.Modals.Clipboard
|
||||
import qs.Modals.Common
|
||||
import qs.Services
|
||||
|
||||
DankModal {
|
||||
DModal {
|
||||
id: clipboardHistoryModal
|
||||
|
||||
layerNamespace: "dms:clipboard"
|
||||
|
||||
@@ -8,7 +8,7 @@ import qs.Modals.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
DankPopout {
|
||||
DPopout {
|
||||
id: root
|
||||
|
||||
layerNamespace: "dms:clipboard-popout"
|
||||
|
||||
@@ -17,7 +17,7 @@ Rectangle {
|
||||
opacity: visible ? 1 : 0
|
||||
z: 100
|
||||
|
||||
DankKeyHints {
|
||||
DKeyHints {
|
||||
id: hints
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
@@ -4,7 +4,7 @@ import qs.Common
|
||||
import qs.Modals.Common
|
||||
import qs.Modules.ColorPicker
|
||||
|
||||
DankModal {
|
||||
DModal {
|
||||
id: root
|
||||
|
||||
layerNamespace: "dms:color-picker"
|
||||
|
||||
@@ -2,7 +2,7 @@ import QtQuick
|
||||
import qs.Common
|
||||
import qs.Modals.Common
|
||||
|
||||
DankModal {
|
||||
DModal {
|
||||
id: root
|
||||
|
||||
layerNamespace: "dms:confirm-modal"
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
Item {
|
||||
id: root
|
||||
readonly property bool isFloatingWindowSurface: impl.item?.isFloatingWindowSurface ?? true
|
||||
readonly property var log: Log.scoped("DModal")
|
||||
|
||||
readonly property bool useHyprlandFocusGrab: CompositorService.useHyprlandFocusGrab
|
||||
property string layerNamespace: "dms:modal"
|
||||
property Component content: null
|
||||
property Item directContent: null
|
||||
property real modalWidth: 400
|
||||
property real modalHeight: 300
|
||||
property var targetScreen
|
||||
property bool showBackground: true
|
||||
property real backgroundOpacity: Theme.scrimAlpha
|
||||
property string positioning: "center"
|
||||
property point customPosition: Qt.point(0, 0)
|
||||
property bool closeOnEscapeKey: true
|
||||
property bool closeOnBackgroundClick: true
|
||||
property string animationType: "scale"
|
||||
property int animationDuration: Theme.modalAnimationDuration
|
||||
property real animationScaleCollapsed: Theme.popupEnterScale
|
||||
property real animationOffset: Theme.spacingL
|
||||
property list<real> animationEnterCurve: Theme.expressiveCurves.expressiveDefaultSpatial
|
||||
property list<real> animationExitCurve: Theme.expressiveCurves.emphasized
|
||||
property color backgroundColor: Theme.floatingWindowSurface
|
||||
property color borderColor: Theme.outlineVariant
|
||||
property real borderWidth: 0
|
||||
property real cornerRadius: Theme.windowRadius
|
||||
property bool enableShadow: true
|
||||
property bool shouldBeVisible: false
|
||||
property bool shouldHaveFocus: shouldBeVisible
|
||||
property bool allowFocusOverride: false
|
||||
property bool allowStacking: false
|
||||
property bool keepContentLoaded: false
|
||||
property bool keepPopoutsOpen: false
|
||||
property var customKeyboardFocus: null
|
||||
readonly property alias transientSurfaceTracker: _transientSurfaceTracker
|
||||
property bool useOverlayLayer: false
|
||||
|
||||
signal opened
|
||||
signal dialogClosed
|
||||
signal backgroundClicked
|
||||
|
||||
readonly property var contentLoader: impl.item ? impl.item.contentLoader : null
|
||||
readonly property alias modalFocusScope: _modalFocusScope
|
||||
|
||||
TransientSurfaceTracker {
|
||||
id: _transientSurfaceTracker
|
||||
}
|
||||
|
||||
FocusScope {
|
||||
id: _modalFocusScope
|
||||
objectName: "modalFocusScope"
|
||||
focus: true
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
// Hyprland OnDemand grab delivers keyboard focus to the modal content surface.
|
||||
DFocusGrab {
|
||||
windows: (root.contentWindow ? [root.contentWindow] : []).concat(root.transientSurfaceTracker?.focusWindows ?? [])
|
||||
wanted: KeyboardFocus.wantsGrab(root.shouldHaveFocus, root.customKeyboardFocus)
|
||||
}
|
||||
readonly property var contentWindow: impl.item ? impl.item.contentWindow : null
|
||||
readonly property var effectiveScreen: impl.item ? impl.item.effectiveScreen : null
|
||||
readonly property real screenWidth: impl.item ? impl.item.screenWidth : 1920
|
||||
readonly property real screenHeight: impl.item ? impl.item.screenHeight : 1080
|
||||
readonly property real dpr: impl.item ? impl.item.dpr : 1
|
||||
readonly property bool isClosing: impl.item ? (impl.item.isClosing ?? false) : false
|
||||
readonly property real alignedX: impl.item ? impl.item.alignedX : 0
|
||||
readonly property real alignedY: impl.item ? impl.item.alignedY : 0
|
||||
readonly property real alignedWidth: impl.item ? impl.item.alignedWidth : 0
|
||||
readonly property real alignedHeight: impl.item ? impl.item.alignedHeight : 0
|
||||
|
||||
function open() {
|
||||
_maybeResolveBackend();
|
||||
if (impl.item)
|
||||
impl.item.open();
|
||||
}
|
||||
|
||||
function close() {
|
||||
transientSurfaceTracker?.closeAll?.();
|
||||
if (impl.item)
|
||||
impl.item.close();
|
||||
}
|
||||
|
||||
function instantClose() {
|
||||
transientSurfaceTracker?.closeAll?.();
|
||||
if (impl.item && typeof impl.item.instantClose === "function")
|
||||
impl.item.instantClose();
|
||||
}
|
||||
|
||||
function toggle() {
|
||||
if (impl.item)
|
||||
impl.item.toggle();
|
||||
}
|
||||
|
||||
readonly property bool _desiredConnected: FrameTransitionState.effectiveConnectedFrameModeActive
|
||||
property bool _resolvedConnected: false
|
||||
|
||||
Component.onCompleted: _loadHost(_desiredConnected)
|
||||
|
||||
readonly property bool settingsConnectedFrameModeActive: SettingsData.connectedFrameModeActive
|
||||
|
||||
onSettingsConnectedFrameModeActiveChanged: _maybeResolveBackend()
|
||||
|
||||
function _maybeResolveBackend() {
|
||||
if (_resolvedConnected === _desiredConnected)
|
||||
return;
|
||||
if (impl.item && (impl.item.shouldBeVisible || impl.item.isClosing))
|
||||
return;
|
||||
_loadHost(_desiredConnected);
|
||||
}
|
||||
|
||||
function _loadHost(connected) {
|
||||
impl.sourceComponent = null;
|
||||
_resolvedConnected = connected;
|
||||
impl.sourceComponent = hostComponent;
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: impl
|
||||
onItemChanged: if (item)
|
||||
root._wireBackend(item)
|
||||
}
|
||||
|
||||
Component {
|
||||
id: hostComponent
|
||||
DModalHost {
|
||||
id: host
|
||||
|
||||
modalHandle: root
|
||||
connected: root._resolvedConnected
|
||||
|
||||
onShouldBeVisibleChanged: {
|
||||
if (root.shouldBeVisible !== host.shouldBeVisible)
|
||||
root.shouldBeVisible = host.shouldBeVisible;
|
||||
}
|
||||
onShouldHaveFocusChanged: {
|
||||
if (root.shouldHaveFocus !== host.shouldHaveFocus)
|
||||
root.shouldHaveFocus = host.shouldHaveFocus;
|
||||
}
|
||||
onOpened: root.opened()
|
||||
onDialogClosed: {
|
||||
root.dialogClosed();
|
||||
root._maybeResolveBackend();
|
||||
}
|
||||
onBackgroundClicked: root.backgroundClicked()
|
||||
}
|
||||
}
|
||||
|
||||
function _wireBackend(it) {
|
||||
it.shouldBeVisible = root.shouldBeVisible;
|
||||
it.shouldHaveFocus = root.shouldHaveFocus;
|
||||
_modalFocusScope.parent = it.modalFocusScope;
|
||||
}
|
||||
|
||||
onShouldBeVisibleChanged: {
|
||||
if (!shouldBeVisible)
|
||||
transientSurfaceTracker?.closeAll?.();
|
||||
if (impl.item && impl.item.shouldBeVisible !== shouldBeVisible)
|
||||
impl.item.shouldBeVisible = shouldBeVisible;
|
||||
}
|
||||
|
||||
onShouldHaveFocusChanged: {
|
||||
if (impl.item && impl.item.shouldHaveFocus !== shouldHaveFocus)
|
||||
impl.item.shouldHaveFocus = shouldHaveFocus;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -11,7 +11,7 @@ import "../../Common/FluidGeometry.js" as FluidGeometry
|
||||
Item {
|
||||
id: root
|
||||
readonly property bool isFloatingWindowSurface: !frameOwnsConnectedChrome
|
||||
readonly property var log: Log.scoped("DankModalHost")
|
||||
readonly property var log: Log.scoped("DModalHost")
|
||||
|
||||
required property var modalHandle
|
||||
property bool connected: true
|
||||
@@ -1,173 +1,7 @@
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
Item {
|
||||
id: root
|
||||
readonly property bool isFloatingWindowSurface: impl.item?.isFloatingWindowSurface ?? true
|
||||
readonly property var log: Log.scoped("DankModal")
|
||||
|
||||
readonly property bool useHyprlandFocusGrab: CompositorService.useHyprlandFocusGrab
|
||||
property string layerNamespace: "dms:modal"
|
||||
property Component content: null
|
||||
property Item directContent: null
|
||||
property real modalWidth: 400
|
||||
property real modalHeight: 300
|
||||
property var targetScreen
|
||||
property bool showBackground: true
|
||||
property real backgroundOpacity: Theme.scrimAlpha
|
||||
property string positioning: "center"
|
||||
property point customPosition: Qt.point(0, 0)
|
||||
property bool closeOnEscapeKey: true
|
||||
property bool closeOnBackgroundClick: true
|
||||
property string animationType: "scale"
|
||||
property int animationDuration: Theme.modalAnimationDuration
|
||||
property real animationScaleCollapsed: Theme.popupEnterScale
|
||||
property real animationOffset: Theme.spacingL
|
||||
property list<real> animationEnterCurve: Theme.expressiveCurves.expressiveDefaultSpatial
|
||||
property list<real> animationExitCurve: Theme.expressiveCurves.emphasized
|
||||
property color backgroundColor: Theme.floatingWindowSurface
|
||||
property color borderColor: Theme.outlineVariant
|
||||
property real borderWidth: 0
|
||||
property real cornerRadius: Theme.windowRadius
|
||||
property bool enableShadow: true
|
||||
property bool shouldBeVisible: false
|
||||
property bool shouldHaveFocus: shouldBeVisible
|
||||
property bool allowFocusOverride: false
|
||||
property bool allowStacking: false
|
||||
property bool keepContentLoaded: false
|
||||
property bool keepPopoutsOpen: false
|
||||
property var customKeyboardFocus: null
|
||||
readonly property alias transientSurfaceTracker: _transientSurfaceTracker
|
||||
property bool useOverlayLayer: false
|
||||
|
||||
signal opened
|
||||
signal dialogClosed
|
||||
signal backgroundClicked
|
||||
|
||||
readonly property var contentLoader: impl.item ? impl.item.contentLoader : null
|
||||
readonly property alias modalFocusScope: _modalFocusScope
|
||||
|
||||
TransientSurfaceTracker {
|
||||
id: _transientSurfaceTracker
|
||||
}
|
||||
|
||||
FocusScope {
|
||||
id: _modalFocusScope
|
||||
objectName: "modalFocusScope"
|
||||
focus: true
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
// Hyprland OnDemand grab delivers keyboard focus to the modal content surface.
|
||||
DankFocusGrab {
|
||||
windows: (root.contentWindow ? [root.contentWindow] : []).concat(root.transientSurfaceTracker?.focusWindows ?? [])
|
||||
wanted: KeyboardFocus.wantsGrab(root.shouldHaveFocus, root.customKeyboardFocus)
|
||||
}
|
||||
readonly property var contentWindow: impl.item ? impl.item.contentWindow : null
|
||||
readonly property var effectiveScreen: impl.item ? impl.item.effectiveScreen : null
|
||||
readonly property real screenWidth: impl.item ? impl.item.screenWidth : 1920
|
||||
readonly property real screenHeight: impl.item ? impl.item.screenHeight : 1080
|
||||
readonly property real dpr: impl.item ? impl.item.dpr : 1
|
||||
readonly property bool isClosing: impl.item ? (impl.item.isClosing ?? false) : false
|
||||
readonly property real alignedX: impl.item ? impl.item.alignedX : 0
|
||||
readonly property real alignedY: impl.item ? impl.item.alignedY : 0
|
||||
readonly property real alignedWidth: impl.item ? impl.item.alignedWidth : 0
|
||||
readonly property real alignedHeight: impl.item ? impl.item.alignedHeight : 0
|
||||
|
||||
function open() {
|
||||
_maybeResolveBackend();
|
||||
if (impl.item)
|
||||
impl.item.open();
|
||||
}
|
||||
|
||||
function close() {
|
||||
transientSurfaceTracker?.closeAll?.();
|
||||
if (impl.item)
|
||||
impl.item.close();
|
||||
}
|
||||
|
||||
function instantClose() {
|
||||
transientSurfaceTracker?.closeAll?.();
|
||||
if (impl.item && typeof impl.item.instantClose === "function")
|
||||
impl.item.instantClose();
|
||||
}
|
||||
|
||||
function toggle() {
|
||||
if (impl.item)
|
||||
impl.item.toggle();
|
||||
}
|
||||
|
||||
readonly property bool _desiredConnected: FrameTransitionState.effectiveConnectedFrameModeActive
|
||||
property bool _resolvedConnected: false
|
||||
|
||||
Component.onCompleted: _loadHost(_desiredConnected)
|
||||
|
||||
readonly property bool settingsConnectedFrameModeActive: SettingsData.connectedFrameModeActive
|
||||
|
||||
onSettingsConnectedFrameModeActiveChanged: _maybeResolveBackend()
|
||||
|
||||
function _maybeResolveBackend() {
|
||||
if (_resolvedConnected === _desiredConnected)
|
||||
return;
|
||||
if (impl.item && (impl.item.shouldBeVisible || impl.item.isClosing))
|
||||
return;
|
||||
_loadHost(_desiredConnected);
|
||||
}
|
||||
|
||||
function _loadHost(connected) {
|
||||
impl.sourceComponent = null;
|
||||
_resolvedConnected = connected;
|
||||
impl.sourceComponent = hostComponent;
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: impl
|
||||
onItemChanged: if (item)
|
||||
root._wireBackend(item)
|
||||
}
|
||||
|
||||
Component {
|
||||
id: hostComponent
|
||||
DankModalHost {
|
||||
id: host
|
||||
|
||||
modalHandle: root
|
||||
connected: root._resolvedConnected
|
||||
|
||||
onShouldBeVisibleChanged: {
|
||||
if (root.shouldBeVisible !== host.shouldBeVisible)
|
||||
root.shouldBeVisible = host.shouldBeVisible;
|
||||
}
|
||||
onShouldHaveFocusChanged: {
|
||||
if (root.shouldHaveFocus !== host.shouldHaveFocus)
|
||||
root.shouldHaveFocus = host.shouldHaveFocus;
|
||||
}
|
||||
onOpened: root.opened()
|
||||
onDialogClosed: {
|
||||
root.dialogClosed();
|
||||
root._maybeResolveBackend();
|
||||
}
|
||||
onBackgroundClicked: root.backgroundClicked()
|
||||
}
|
||||
}
|
||||
|
||||
function _wireBackend(it) {
|
||||
it.shouldBeVisible = root.shouldBeVisible;
|
||||
it.shouldHaveFocus = root.shouldHaveFocus;
|
||||
_modalFocusScope.parent = it.modalFocusScope;
|
||||
}
|
||||
|
||||
onShouldBeVisibleChanged: {
|
||||
if (!shouldBeVisible)
|
||||
transientSurfaceTracker?.closeAll?.();
|
||||
if (impl.item && impl.item.shouldBeVisible !== shouldBeVisible)
|
||||
impl.item.shouldBeVisible = shouldBeVisible;
|
||||
}
|
||||
|
||||
onShouldHaveFocusChanged: {
|
||||
if (impl.item && impl.item.shouldHaveFocus !== shouldHaveFocus)
|
||||
impl.item.shouldHaveFocus = shouldHaveFocus;
|
||||
}
|
||||
DModal {
|
||||
id: shim
|
||||
Component.onCompleted: Deprecation.type(shim, "DankModal", "DModal", "qs.Modals.Common")
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import qs.Common
|
||||
import qs.Modals.Common
|
||||
import qs.DCommon.Widgets
|
||||
|
||||
DankModal {
|
||||
DModal {
|
||||
id: root
|
||||
|
||||
layerNamespace: "dms:input-modal"
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ pragma ComponentBehavior: Bound
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
import qs.DCommon.Widgets
|
||||
import qs.Modals.DankLauncherV2
|
||||
import qs.Modals.DLauncherV2
|
||||
import "../../../Common/htmlElide.js" as HtmlElide
|
||||
|
||||
DListItem {
|
||||
+1
-1
@@ -3,7 +3,7 @@ pragma ComponentBehavior: Bound
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
import qs.DCommon.Widgets
|
||||
import qs.Modals.DankLauncherV2
|
||||
import qs.Modals.DLauncherV2
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
+38
-36
@@ -64,37 +64,37 @@ Item {
|
||||
property bool _dmenuSelectApplied: false
|
||||
|
||||
readonly property var _dmenuKeyNameMap: (function () {
|
||||
var m = ({});
|
||||
for (var c = 0; c < 26; c++)
|
||||
m[String.fromCharCode(97 + c)] = Qt.Key_A + c;
|
||||
for (var d = 0; d <= 9; d++)
|
||||
m[String(d)] = Qt.Key_0 + d;
|
||||
for (var f = 1; f <= 12; f++)
|
||||
m["f" + f] = Qt.Key_F1 + (f - 1);
|
||||
m["return"] = Qt.Key_Return;
|
||||
m["enter"] = Qt.Key_Enter;
|
||||
m["tab"] = Qt.Key_Tab;
|
||||
m["space"] = Qt.Key_Space;
|
||||
m["escape"] = Qt.Key_Escape;
|
||||
m["esc"] = Qt.Key_Escape;
|
||||
m["delete"] = Qt.Key_Delete;
|
||||
m["backspace"] = Qt.Key_Backspace;
|
||||
m["insert"] = Qt.Key_Insert;
|
||||
m["home"] = Qt.Key_Home;
|
||||
m["end"] = Qt.Key_End;
|
||||
m["pageup"] = Qt.Key_PageUp;
|
||||
m["pagedown"] = Qt.Key_PageDown;
|
||||
m["up"] = Qt.Key_Up;
|
||||
m["down"] = Qt.Key_Down;
|
||||
m["left"] = Qt.Key_Left;
|
||||
m["right"] = Qt.Key_Right;
|
||||
m["minus"] = Qt.Key_Minus;
|
||||
m["equal"] = Qt.Key_Equal;
|
||||
m["comma"] = Qt.Key_Comma;
|
||||
m["period"] = Qt.Key_Period;
|
||||
m["slash"] = Qt.Key_Slash;
|
||||
return m;
|
||||
})()
|
||||
var m = ({});
|
||||
for (var c = 0; c < 26; c++)
|
||||
m[String.fromCharCode(97 + c)] = Qt.Key_A + c;
|
||||
for (var d = 0; d <= 9; d++)
|
||||
m[String(d)] = Qt.Key_0 + d;
|
||||
for (var f = 1; f <= 12; f++)
|
||||
m["f" + f] = Qt.Key_F1 + (f - 1);
|
||||
m["return"] = Qt.Key_Return;
|
||||
m["enter"] = Qt.Key_Enter;
|
||||
m["tab"] = Qt.Key_Tab;
|
||||
m["space"] = Qt.Key_Space;
|
||||
m["escape"] = Qt.Key_Escape;
|
||||
m["esc"] = Qt.Key_Escape;
|
||||
m["delete"] = Qt.Key_Delete;
|
||||
m["backspace"] = Qt.Key_Backspace;
|
||||
m["insert"] = Qt.Key_Insert;
|
||||
m["home"] = Qt.Key_Home;
|
||||
m["end"] = Qt.Key_End;
|
||||
m["pageup"] = Qt.Key_PageUp;
|
||||
m["pagedown"] = Qt.Key_PageDown;
|
||||
m["up"] = Qt.Key_Up;
|
||||
m["down"] = Qt.Key_Down;
|
||||
m["left"] = Qt.Key_Left;
|
||||
m["right"] = Qt.Key_Right;
|
||||
m["minus"] = Qt.Key_Minus;
|
||||
m["equal"] = Qt.Key_Equal;
|
||||
m["comma"] = Qt.Key_Comma;
|
||||
m["period"] = Qt.Key_Period;
|
||||
m["slash"] = Qt.Key_Slash;
|
||||
return m;
|
||||
})()
|
||||
|
||||
function _parseDmenuKeySpec(spec) {
|
||||
var parts = spec.toLowerCase().split("+").map(function (s) {
|
||||
@@ -1216,11 +1216,13 @@ Item {
|
||||
clearActivePluginViewPreference();
|
||||
|
||||
if (searchMode === "dmenu") {
|
||||
var dmenuGroups = [{
|
||||
title: "",
|
||||
icon: "",
|
||||
items: []
|
||||
}];
|
||||
var dmenuGroups = [
|
||||
{
|
||||
title: "",
|
||||
icon: "",
|
||||
items: []
|
||||
}
|
||||
];
|
||||
for (var gi = 0; gi < dmenuItems.length; gi++) {
|
||||
var gitem = dmenuItems[gi];
|
||||
if (gitem.data.header) {
|
||||
+3
-3
@@ -4,7 +4,7 @@ import qs.Services
|
||||
|
||||
Item {
|
||||
id: root
|
||||
readonly property var log: Log.scoped("DankLauncherV2Modal")
|
||||
readonly property var log: Log.scoped("DLauncherV2Modal")
|
||||
|
||||
readonly property bool spotlightOpen: impl.item ? impl.item.spotlightOpen : false
|
||||
readonly property bool isClosing: impl.item ? impl.item.isClosing : false
|
||||
@@ -106,7 +106,7 @@ Item {
|
||||
|
||||
Component {
|
||||
id: hostComp
|
||||
DankLauncherV2ModalHost {
|
||||
DLauncherV2ModalHost {
|
||||
modalHandle: root
|
||||
triggerUsesOverlayLayer: root.triggerUsesOverlayLayer
|
||||
connected: root._resolvedConnected
|
||||
@@ -117,7 +117,7 @@ Item {
|
||||
|
||||
Component {
|
||||
id: islandComp
|
||||
DankLauncherV2ModalIsland {
|
||||
DLauncherV2ModalIsland {
|
||||
modalHandle: root
|
||||
triggerUsesOverlayLayer: root.triggerUsesOverlayLayer
|
||||
onDialogClosed: root._hostDialogClosed()
|
||||
+2
-2
@@ -5,7 +5,7 @@ import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Hyprland
|
||||
import qs.Common
|
||||
import qs.Modals.DankLauncherV2.Components
|
||||
import qs.Modals.DLauncherV2.Components
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
import "../../Common/FluidGeometry.js" as FluidGeometry
|
||||
@@ -15,7 +15,7 @@ Item {
|
||||
property bool connected: true
|
||||
property bool spotlight: false
|
||||
readonly property bool isFloatingWindowSurface: connected ? !connectedSurfaceOverride : !frameConnected
|
||||
readonly property var log: Log.scoped("DankLauncherV2ModalHost")
|
||||
readonly property var log: Log.scoped("DLauncherV2ModalHost")
|
||||
|
||||
property bool _fluidMotionActive: false
|
||||
readonly property bool connectedFluidMotion: _fluidMotionActive && frameOwnsConnectedChrome
|
||||
+3
-3
@@ -2,7 +2,7 @@ pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
import qs.Modals.DankLauncherV2.Components
|
||||
import qs.Modals.DLauncherV2.Components
|
||||
import qs.Services
|
||||
|
||||
Item {
|
||||
@@ -13,7 +13,7 @@ Item {
|
||||
property bool usingFallback: false
|
||||
property bool _islandWasOpen: false
|
||||
|
||||
readonly property var log: Log.scoped("DankLauncherV2ModalIsland")
|
||||
readonly property var log: Log.scoped("DLauncherV2ModalIsland")
|
||||
readonly property var router: PopoutService.dankIslandRouter
|
||||
readonly property bool spotlightOpen: usingFallback ? fallback.spotlightOpen : (router?.launcherOpen ?? false)
|
||||
readonly property bool isClosing: usingFallback ? fallback.isClosing : false
|
||||
@@ -123,7 +123,7 @@ Item {
|
||||
dialogClosed();
|
||||
}
|
||||
|
||||
DankLauncherV2ModalHost {
|
||||
DLauncherV2ModalHost {
|
||||
id: fallback
|
||||
|
||||
connected: root.modalHandle?._resolvedConnected ?? false
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
.pragma library
|
||||
|
||||
.import "ControllerUtils.js" as Utils
|
||||
.import "ControllerUtils.js" as Utils
|
||||
|
||||
function transformDmenuItem(text, index, opts) {
|
||||
opts = opts || {};
|
||||
+4
-4
@@ -6,7 +6,7 @@ import qs.Common
|
||||
import qs.Services
|
||||
import qs.DCommon.Widgets
|
||||
import qs.Widgets
|
||||
import qs.Modals.DankLauncherV2.Components
|
||||
import qs.Modals.DLauncherV2.Components
|
||||
|
||||
FocusScope {
|
||||
id: root
|
||||
@@ -514,7 +514,7 @@ FocusScope {
|
||||
}
|
||||
}
|
||||
|
||||
DankDropdown {
|
||||
DDropdown {
|
||||
id: categoryDropdown
|
||||
transientSurfaceTracker: root.transientSurfaceTracker
|
||||
focusPolicy: Qt.NoFocus
|
||||
@@ -581,7 +581,7 @@ FocusScope {
|
||||
height: Theme.buttonHeightS
|
||||
spacing: Theme.spacingS
|
||||
|
||||
DankDropdown {
|
||||
DDropdown {
|
||||
id: typeDropdown
|
||||
focusPolicy: Qt.NoFocus
|
||||
focusReturnTarget: searchField
|
||||
@@ -621,7 +621,7 @@ FocusScope {
|
||||
}
|
||||
}
|
||||
|
||||
DankDropdown {
|
||||
DDropdown {
|
||||
id: sortDropdown
|
||||
focusPolicy: Qt.NoFocus
|
||||
focusReturnTarget: searchField
|
||||
+1
-1
@@ -4,7 +4,7 @@ import qs.Services
|
||||
import qs.Widgets
|
||||
import "ControllerUtils.js" as Utils
|
||||
|
||||
DankContextMenu {
|
||||
DContextMenu {
|
||||
id: root
|
||||
|
||||
property var item: null
|
||||
+6
-6
@@ -47,12 +47,12 @@ function getSectionBounds(flatModel, sectionId) {
|
||||
|
||||
function getGridColumns(viewMode, gridColumns) {
|
||||
switch (viewMode) {
|
||||
case "tile":
|
||||
return 3;
|
||||
case "grid":
|
||||
return gridColumns;
|
||||
default:
|
||||
return 1;
|
||||
case "tile":
|
||||
return 3;
|
||||
case "grid":
|
||||
return gridColumns;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import Quickshell
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.DCommon.Widgets
|
||||
import qs.Modals.DankLauncherV2.Components
|
||||
import qs.Modals.DLauncherV2.Components
|
||||
|
||||
Item {
|
||||
id: root
|
||||
+1
-1
@@ -3,7 +3,7 @@ pragma ComponentBehavior: Bound
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import qs.Common
|
||||
import qs.Modals.DankLauncherV2.Components
|
||||
import qs.Modals.DLauncherV2.Components
|
||||
|
||||
Item {
|
||||
id: root
|
||||
+2
-2
@@ -5,7 +5,7 @@ import qs.Common
|
||||
import qs.Services
|
||||
import qs.DCommon.Widgets
|
||||
import qs.Widgets
|
||||
import qs.Modals.DankLauncherV2.Components
|
||||
import qs.Modals.DLauncherV2.Components
|
||||
|
||||
Item {
|
||||
id: root
|
||||
@@ -124,7 +124,7 @@ Item {
|
||||
Loader {
|
||||
id: categoryDropdown
|
||||
active: root.hasAppCategories
|
||||
sourceComponent: DankDropdown {
|
||||
sourceComponent: DDropdown {
|
||||
showTrigger: false
|
||||
focusPolicy: Qt.NoFocus
|
||||
popupWidth: Math.min(Theme.fieldDefaultWidth, root.width)
|
||||
+1
-1
@@ -5,7 +5,7 @@ import Quickshell.Widgets
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.DCommon.Widgets
|
||||
import qs.Modals.DankLauncherV2.Components
|
||||
import qs.Modals.DLauncherV2.Components
|
||||
|
||||
FocusScope {
|
||||
id: root
|
||||
+1
-1
@@ -6,7 +6,7 @@ import Quickshell.Wayland
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.DCommon.Widgets
|
||||
import qs.Modals.DankLauncherV2.Components
|
||||
import qs.Modals.DLauncherV2.Components
|
||||
|
||||
LauncherTile {
|
||||
id: root
|
||||
@@ -3,7 +3,7 @@ import qs.Common
|
||||
import qs.Modals.Common
|
||||
import qs.DCommon.Widgets
|
||||
|
||||
DankModal {
|
||||
DModal {
|
||||
id: root
|
||||
|
||||
property string outputName: ""
|
||||
|
||||
@@ -4,7 +4,7 @@ import qs.Common
|
||||
import qs.DCommon.FileBrowser
|
||||
import qs.Modals.Common
|
||||
|
||||
DankModal {
|
||||
DModal {
|
||||
id: fileBrowserSurfaceModal
|
||||
|
||||
property string mode: folderMode ? "openFolder" : saveMode ? "save" : "open"
|
||||
|
||||
@@ -5,7 +5,7 @@ import qs.Services
|
||||
import qs.DCommon.Widgets
|
||||
import qs.Widgets
|
||||
|
||||
DankFloatingWindow {
|
||||
DFloatingWindow {
|
||||
id: root
|
||||
readonly property var log: Log.scoped("GreeterModal")
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import qs.Modals
|
||||
import qs.Modals.Common
|
||||
import qs.Services
|
||||
|
||||
DankModal {
|
||||
DModal {
|
||||
id: overlay
|
||||
|
||||
signal floatingToggleRequested
|
||||
|
||||
@@ -5,7 +5,7 @@ import qs.Services
|
||||
import qs.DCommon.Widgets
|
||||
import qs.Widgets
|
||||
|
||||
DankFloatingWindow {
|
||||
DFloatingWindow {
|
||||
id: win
|
||||
|
||||
property alias shouldBeVisible: win.visible
|
||||
|
||||
@@ -10,7 +10,7 @@ import qs.Services
|
||||
import qs.DCommon.Widgets
|
||||
import qs.Widgets
|
||||
|
||||
DankModal {
|
||||
DModal {
|
||||
id: muxModal
|
||||
|
||||
layerNamespace: "dms:mux"
|
||||
@@ -559,7 +559,7 @@ DankModal {
|
||||
}
|
||||
}
|
||||
|
||||
DankKeyHints {
|
||||
DKeyHints {
|
||||
id: shortcutsBar
|
||||
|
||||
width: parent.width
|
||||
|
||||
@@ -4,7 +4,7 @@ import qs.Modals.Common
|
||||
import qs.Services
|
||||
import qs.DCommon.Widgets
|
||||
|
||||
DankModal {
|
||||
DModal {
|
||||
id: root
|
||||
|
||||
property bool wired: false
|
||||
|
||||
@@ -6,7 +6,7 @@ import qs.Modals.Common
|
||||
import qs.Modules.Notifications.Center
|
||||
import qs.Services
|
||||
|
||||
DankModal {
|
||||
DModal {
|
||||
id: notificationModal
|
||||
|
||||
layerNamespace: "dms:notification-center-modal"
|
||||
@@ -106,7 +106,7 @@ DankModal {
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
// DankIsland owns this trigger whenever it is the sole bar for the screen.
|
||||
// DIsland owns this trigger whenever it is the sole bar for the screen.
|
||||
function open(): string {
|
||||
if (PopoutService.routeToIsland("notificationcenter", null, false))
|
||||
return "NOTIFICATION_ISLAND_OPEN_SUCCESS";
|
||||
|
||||
@@ -4,7 +4,7 @@ import qs.Services
|
||||
import qs.DCommon.Widgets
|
||||
import qs.Widgets
|
||||
|
||||
DankFloatingWindow {
|
||||
DFloatingWindow {
|
||||
id: root
|
||||
|
||||
property var currentFlow: null
|
||||
|
||||
@@ -4,7 +4,7 @@ import qs.Common
|
||||
import qs.Modals.Common
|
||||
import qs.Services
|
||||
|
||||
DankModal {
|
||||
DModal {
|
||||
id: root
|
||||
|
||||
property var parentPopout: null
|
||||
|
||||
@@ -5,7 +5,7 @@ import qs.Services
|
||||
import qs.Modules.PowerMenu
|
||||
import qs.DCommon.Session
|
||||
|
||||
DankModal {
|
||||
DModal {
|
||||
id: root
|
||||
|
||||
layerNamespace: "dms:power-menu"
|
||||
|
||||
@@ -5,7 +5,7 @@ import qs.Services
|
||||
import qs.DCommon.Widgets
|
||||
import Quickshell.Services.UPower
|
||||
|
||||
DankModal {
|
||||
DModal {
|
||||
id: root
|
||||
|
||||
layerNamespace: "dms:power-profiles"
|
||||
|
||||
@@ -8,7 +8,7 @@ import qs.DCommon.Widgets
|
||||
import qs.Widgets
|
||||
import "../Common/Format.js" as Format
|
||||
|
||||
DankFloatingWindow {
|
||||
DFloatingWindow {
|
||||
id: processListModal
|
||||
readonly property var log: Log.scoped("ProcessListModal")
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import qs.Common
|
||||
import qs.Services
|
||||
import qs.DCommon.Widgets
|
||||
|
||||
DankModal {
|
||||
DModal {
|
||||
id: root
|
||||
visible: false
|
||||
layerNamespace: "dms:qr-generator"
|
||||
|
||||
@@ -373,9 +373,9 @@ FocusScope {
|
||||
"keybinds": "KeybindsTab.qml",
|
||||
"dankbar_widgets": "WidgetsTab.qml",
|
||||
"window_rules": "WindowRulesTab.qml",
|
||||
"dankbar_settings": "DankBarTab.qml",
|
||||
"dankbar_appearance": "DankBarAppearanceTab.qml",
|
||||
"dankbar_dot": "DankDotTab.qml",
|
||||
"dankbar_settings": "DBarTab.qml",
|
||||
"dankbar_appearance": "DBarAppearanceTab.qml",
|
||||
"dankbar_dot": "DDotTab.qml",
|
||||
"bar_widget": "BarWidgetTab.qml",
|
||||
"compositor_layout": "CompositorLayoutTab.qml",
|
||||
"dock_general": "DockGeneralTab.qml",
|
||||
@@ -419,7 +419,7 @@ FocusScope {
|
||||
"greeter_auth": "GreeterAuthTab.qml",
|
||||
"autostart": "AutoStartTab.qml",
|
||||
"battery": "BatteryTab.qml",
|
||||
"dank_dash": "DankDashTab.qml",
|
||||
"dank_dash": "DDashTab.qml",
|
||||
"wellbeing": "DigitalWellbeingTab.qml",
|
||||
"mouse_touchpad": "MouseTouchpadTab.qml",
|
||||
"keyboard": "KeyboardTab.qml",
|
||||
|
||||
@@ -7,7 +7,7 @@ import qs.DCommon.Widgets
|
||||
import qs.Widgets
|
||||
import qs.Modules.Settings.Widgets
|
||||
|
||||
DankFloatingWindow {
|
||||
DFloatingWindow {
|
||||
id: settingsModal
|
||||
|
||||
property var profileBrowser: profileBrowserLoader.item
|
||||
|
||||
@@ -4,7 +4,7 @@ import qs.Modals.Common
|
||||
import qs.Services
|
||||
import qs.DCommon.Widgets
|
||||
|
||||
DankModal {
|
||||
DModal {
|
||||
id: root
|
||||
|
||||
property bool lockOnSwitch: false
|
||||
|
||||
@@ -6,7 +6,7 @@ import qs.Services
|
||||
import qs.DCommon.Widgets
|
||||
import qs.Widgets
|
||||
|
||||
DankFloatingWindow {
|
||||
DFloatingWindow {
|
||||
id: root
|
||||
|
||||
function show() {
|
||||
|
||||
@@ -5,7 +5,7 @@ import qs.Services
|
||||
import qs.DCommon.Widgets
|
||||
import qs.Widgets
|
||||
|
||||
DankModal {
|
||||
DModal {
|
||||
id: root
|
||||
|
||||
layerNamespace: "dms:wifi-password"
|
||||
@@ -438,7 +438,7 @@ DankModal {
|
||||
color: Theme.surfaceVariantText
|
||||
}
|
||||
|
||||
DankDropdown {
|
||||
DDropdown {
|
||||
width: parent.width
|
||||
dropdownWidth: parent.width
|
||||
compactMode: true
|
||||
@@ -462,7 +462,7 @@ DankModal {
|
||||
color: Theme.surfaceVariantText
|
||||
}
|
||||
|
||||
DankDropdown {
|
||||
DDropdown {
|
||||
width: parent.width
|
||||
dropdownWidth: parent.width
|
||||
compactMode: true
|
||||
|
||||
@@ -8,7 +8,7 @@ import qs.Common
|
||||
import qs.Services
|
||||
import qs.DCommon.Widgets
|
||||
|
||||
DankModal {
|
||||
DModal {
|
||||
id: root
|
||||
visible: false
|
||||
layerNamespace: "dms:wifi-qrcode"
|
||||
|
||||
@@ -6,7 +6,7 @@ import qs.Modules.Settings.Widgets
|
||||
import qs.DCommon.Widgets
|
||||
import qs.Widgets
|
||||
|
||||
DankFloatingWindow {
|
||||
DFloatingWindow {
|
||||
id: root
|
||||
|
||||
signal ruleSubmitted
|
||||
|
||||
@@ -4,7 +4,7 @@ import qs.Services
|
||||
import qs.DCommon.Widgets
|
||||
import qs.Widgets
|
||||
|
||||
DankFloatingWindow {
|
||||
DFloatingWindow {
|
||||
id: root
|
||||
readonly property var log: Log.scoped("WorkspaceRenameModal")
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
import qs.Modals.DankLauncherV2
|
||||
import qs.Modals.DLauncherV2
|
||||
import qs.Widgets
|
||||
|
||||
DankPopout {
|
||||
DPopout {
|
||||
id: appDrawerPopout
|
||||
|
||||
layerNamespace: "dms:app-launcher"
|
||||
|
||||
@@ -237,7 +237,7 @@ Variants {
|
||||
}
|
||||
}
|
||||
|
||||
// Theme changes repaint DankBackdrop but nothing else wakes the render loop
|
||||
// Theme changes repaint DBackdrop but nothing else wakes the render loop
|
||||
readonly property color themePrimary: Theme.primary
|
||||
readonly property color themeBackground: Theme.background
|
||||
readonly property bool idleShellLocked: IdleService.isShellLocked
|
||||
@@ -280,7 +280,7 @@ Variants {
|
||||
active: root.showsBackdrop
|
||||
asynchronous: true
|
||||
|
||||
sourceComponent: DankBackdrop {
|
||||
sourceComponent: DBackdrop {
|
||||
screenName: modelData.name
|
||||
blur: Theme.wallpaperBlur
|
||||
onInvalidated: root.invalidate()
|
||||
|
||||
@@ -65,7 +65,7 @@ PluginComponent {
|
||||
title: I18n.tr("Printers")
|
||||
subtitle: CupsService.getCurrentPrinterStatePrettyShort()
|
||||
|
||||
DankDropdown {
|
||||
DDropdown {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
compactMode: true
|
||||
dropdownWidth: CcMetrics.rowDropdownWidth
|
||||
|
||||
@@ -117,7 +117,7 @@ PluginComponent {
|
||||
iconName: "alt_route"
|
||||
title: I18n.tr("Exit node", "Tailscale exit node selector label")
|
||||
|
||||
DankDropdown {
|
||||
DDropdown {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
compactMode: true
|
||||
dropdownWidth: CcMetrics.rowDropdownWidth
|
||||
|
||||
@@ -4,7 +4,7 @@ import qs.Widgets
|
||||
import "../utils/widgets.js" as WidgetUtils
|
||||
import qs.Modules.ControlCenter
|
||||
|
||||
DankGridEditChrome {
|
||||
DGridEditChrome {
|
||||
id: root
|
||||
|
||||
property var widgetData: ({})
|
||||
|
||||
@@ -7,7 +7,7 @@ import qs.Modules.ControlCenter
|
||||
import "../utils/widgets.js" as WidgetUtils
|
||||
import "../../../Common/GridLayout.js" as GridUtils
|
||||
|
||||
DankEditableGrid {
|
||||
DEditableGrid {
|
||||
id: root
|
||||
|
||||
property var model: null
|
||||
|
||||
@@ -5,7 +5,7 @@ import qs.Modules.ControlCenter
|
||||
import "../utils/widgets.js" as WidgetUtils
|
||||
import "../../../Common/GridLayout.js" as GridUtils
|
||||
|
||||
DankEditableGridSlot {
|
||||
DEditableGridSlot {
|
||||
id: root
|
||||
|
||||
readonly property var widgetData: JSON.parse(json)
|
||||
|
||||
@@ -5,11 +5,12 @@ import Quickshell
|
||||
import qs.Common
|
||||
import qs.Modules.ControlCenter
|
||||
import qs.Modules.ControlCenter.Widgets
|
||||
import qs.Modules.DankBar.Widgets
|
||||
import qs.Modules.DankDash
|
||||
import qs.Modules.DBar.Widgets
|
||||
import qs.Modules.DDash
|
||||
import "../utils/widgets.js" as WidgetUtils
|
||||
import "../../../Common/QmlUtils.js" as QmlUtils
|
||||
import qs.Services
|
||||
import qs.DCommon.Widgets
|
||||
import qs.Widgets
|
||||
|
||||
Item {
|
||||
@@ -69,7 +70,7 @@ Item {
|
||||
WidgetUtils.setOption(widgetIndex, key, value);
|
||||
}
|
||||
|
||||
DankContextMenu {
|
||||
DContextMenu {
|
||||
id: contextMenu
|
||||
layerNamespace: "dms:control-center-widget-options"
|
||||
minMenuWidth: CcMetrics.configMenuWidth
|
||||
@@ -129,7 +130,7 @@ Item {
|
||||
visible: root.isIdleInhibitor
|
||||
iconName: "timer"
|
||||
title: I18n.tr("Duration")
|
||||
body: DankDropdown {
|
||||
body: DDropdown {
|
||||
readonly property var presets: IdleInhibitPresets.presetOptions
|
||||
|
||||
compactMode: true
|
||||
|
||||
@@ -57,7 +57,7 @@ FocusScope {
|
||||
readonly property int gridColumns: host.gridColumns ?? Math.min(CcMetrics.gridColumns, gridColumnCap)
|
||||
readonly property real availableGridHeight: (host.availableHeight ?? (host.triggerScreen?.height ?? CcMetrics.fallbackScreenHeight) - CcMetrics.maxHeightInset) - CcMetrics.sheetPadding * 2 - chromeHeight
|
||||
readonly property vector4d chromeRoom: host.chromeRoom ?? Qt.vector4d(Infinity, Infinity, Infinity, Infinity)
|
||||
readonly property DankPanelResizer panelResizer: DankPanelResizer {
|
||||
readonly property DPanelResizer panelResizer: DPanelResizer {
|
||||
popout: root.host
|
||||
stepWidth: CcMetrics.columnWidth + CcMetrics.gridGap
|
||||
widthFor: columns => CcMetrics.sheetWidthFor(columns) + root.sheetContentWidth - CcMetrics.sheetWidthFor(root.gridColumns)
|
||||
@@ -316,7 +316,7 @@ FocusScope {
|
||||
forceActiveFocus();
|
||||
}
|
||||
|
||||
DankGridEditChrome {
|
||||
DGridEditChrome {
|
||||
id: panelChrome
|
||||
|
||||
readonly property real screenWidth: root.host.triggerScreen?.width ?? Infinity
|
||||
|
||||
@@ -4,7 +4,7 @@ import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
DankPopout {
|
||||
DPopout {
|
||||
id: root
|
||||
|
||||
layerNamespace: "dms:control-center"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
import qs.Modules.DankBar.Popouts
|
||||
import qs.Modules.DBar.Popouts
|
||||
import qs.Services
|
||||
|
||||
BatteryPopoutContent {
|
||||
|
||||
@@ -31,7 +31,7 @@ Item {
|
||||
readonly property Item headerActions: Row {
|
||||
spacing: Theme.spacingS
|
||||
|
||||
DankDropdown {
|
||||
DDropdown {
|
||||
id: adapterDropdown
|
||||
|
||||
function adapterLabel(adapter) {
|
||||
|
||||
@@ -83,7 +83,7 @@ Item {
|
||||
readonly property Item headerActions: Row {
|
||||
spacing: Theme.spacingS
|
||||
|
||||
DankDropdown {
|
||||
DDropdown {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: root.wifiMode && (NetworkService.wifiDevices?.length ?? 0) > 1
|
||||
compactMode: true
|
||||
|
||||
@@ -30,8 +30,7 @@ Item {
|
||||
const y = pos.y;
|
||||
const menuX = I18n.isRtl ? x : x + anchor.width - menu.effectiveMenuWidth;
|
||||
const below = y + anchor.height + Theme.spacingXS;
|
||||
const menuY = below + menu.effectiveMenuHeight > screen.height - Theme.spacingS
|
||||
? y - menu.effectiveMenuHeight - Theme.spacingXS : below;
|
||||
const menuY = below + menu.effectiveMenuHeight > screen.height - Theme.spacingS ? y - menu.effectiveMenuHeight - Theme.spacingXS : below;
|
||||
menu.open(screen, menuX, menuY, false);
|
||||
}
|
||||
|
||||
@@ -39,24 +38,24 @@ Item {
|
||||
menu.hide();
|
||||
}
|
||||
|
||||
DankContextMenu {
|
||||
DContextMenu {
|
||||
id: menu
|
||||
layerNamespace: "dms:control-center-menu"
|
||||
minMenuWidth: CcMetrics.menuMinWidth
|
||||
keyboardNavigable: true
|
||||
transientSurfaceTracker: root.transientSurfaceTracker
|
||||
menuItems: root.visibleItems.map(item => ({
|
||||
type: "item",
|
||||
icon: item.iconName || "",
|
||||
text: item.label || "",
|
||||
enabled: item.enabled !== false,
|
||||
isDestructive: item.destructive === true,
|
||||
action: () => {
|
||||
menu.hide();
|
||||
if (typeof item.action === "function")
|
||||
item.action();
|
||||
}
|
||||
}))
|
||||
type: "item",
|
||||
icon: item.iconName || "",
|
||||
text: item.label || "",
|
||||
enabled: item.enabled !== false,
|
||||
isDestructive: item.destructive === true,
|
||||
action: () => {
|
||||
menu.hide();
|
||||
if (typeof item.action === "function")
|
||||
item.action();
|
||||
}
|
||||
}))
|
||||
|
||||
onOpenStateChanged: {
|
||||
if (openState)
|
||||
|
||||
@@ -2,7 +2,7 @@ import QtQuick
|
||||
import QtQuick.Effects
|
||||
import qs.Common
|
||||
import qs.Modules.ControlCenter
|
||||
import qs.Modules.DankDash
|
||||
import qs.Modules.DDash
|
||||
import qs.Services
|
||||
import qs.DCommon.Widgets
|
||||
import qs.Widgets
|
||||
|
||||
+22
-18
@@ -10,48 +10,52 @@ QtObject {
|
||||
readonly property bool isHorizontal: !isVertical
|
||||
|
||||
function primarySize(item) {
|
||||
return isVertical ? item.height : item.width
|
||||
return isVertical ? item.height : item.width;
|
||||
}
|
||||
|
||||
function crossSize(item) {
|
||||
return isVertical ? item.width : item.height
|
||||
return isVertical ? item.width : item.height;
|
||||
}
|
||||
|
||||
function setPrimaryPos(item, value) {
|
||||
if (isVertical) {
|
||||
item.y = value
|
||||
item.y = value;
|
||||
} else {
|
||||
item.x = value
|
||||
item.x = value;
|
||||
}
|
||||
}
|
||||
|
||||
function getPrimaryPos(item) {
|
||||
return isVertical ? item.y : item.x
|
||||
return isVertical ? item.y : item.x;
|
||||
}
|
||||
|
||||
function primaryAnchor(anchors) {
|
||||
return isVertical ? anchors.verticalCenter : anchors.horizontalCenter
|
||||
return isVertical ? anchors.verticalCenter : anchors.horizontalCenter;
|
||||
}
|
||||
|
||||
function crossAnchor(anchors) {
|
||||
return isVertical ? anchors.horizontalCenter : anchors.verticalCenter
|
||||
return isVertical ? anchors.horizontalCenter : anchors.verticalCenter;
|
||||
}
|
||||
|
||||
function outerVisualEdge() {
|
||||
if (edge === "bottom") return "bottom"
|
||||
if (edge === "left") return "right"
|
||||
if (edge === "right") return "left"
|
||||
if (edge === "top") return "top"
|
||||
return "bottom"
|
||||
if (edge === "bottom")
|
||||
return "bottom";
|
||||
if (edge === "left")
|
||||
return "right";
|
||||
if (edge === "right")
|
||||
return "left";
|
||||
if (edge === "top")
|
||||
return "top";
|
||||
return "bottom";
|
||||
}
|
||||
|
||||
signal axisEdgeChanged()
|
||||
signal axisOrientationChanged()
|
||||
signal changed() // Single coalesced signal
|
||||
signal axisEdgeChanged
|
||||
signal axisOrientationChanged
|
||||
signal changed // Single coalesced signal
|
||||
|
||||
onEdgeChanged: {
|
||||
axisEdgeChanged()
|
||||
axisOrientationChanged()
|
||||
changed()
|
||||
axisEdgeChanged();
|
||||
axisOrientationChanged();
|
||||
changed();
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,10 @@ Item {
|
||||
const entries = [];
|
||||
for (let index = 0; index < (entryRepeater?.count ?? 0); index++) {
|
||||
const wrapper = entryRepeater.itemAt(index);
|
||||
entries.push({ size: wrapper?.primarySize ?? 0, mode: wrapper?.overflowMode ?? "bar" });
|
||||
entries.push({
|
||||
size: wrapper?.primarySize ?? 0,
|
||||
mode: wrapper?.overflowMode ?? "bar"
|
||||
});
|
||||
}
|
||||
return entries;
|
||||
}
|
||||
@@ -74,8 +77,12 @@ Item {
|
||||
|
||||
Connections {
|
||||
target: root.entryRepeater
|
||||
function onItemAdded(index, item) { root.entryRevision++; }
|
||||
function onItemRemoved(index, item) { root.entryRevision++; }
|
||||
function onItemAdded(index, item) {
|
||||
root.entryRevision++;
|
||||
}
|
||||
function onItemRemoved(index, item) {
|
||||
root.entryRevision++;
|
||||
}
|
||||
}
|
||||
|
||||
onLayoutEntriesChanged: requestOverflowLayout()
|
||||
@@ -137,7 +144,9 @@ Item {
|
||||
const allEntries = entries.slice();
|
||||
const allStates = participating.slice();
|
||||
if (overflowCount > 0) {
|
||||
allEntries.splice(overflowPosition, 0, { widgetId: "overflow" });
|
||||
allEntries.splice(overflowPosition, 0, {
|
||||
widgetId: "overflow"
|
||||
});
|
||||
allStates.splice(overflowPosition, 0, true);
|
||||
}
|
||||
const next = SegmentRoles.resolve(allEntries, allStates);
|
||||
@@ -81,7 +81,7 @@ Item {
|
||||
id: barVariants
|
||||
model: ShellLayout.hostedScreens(root.barConfig?.id)
|
||||
|
||||
delegate: DankBarWindow {
|
||||
delegate: DBarWindow {
|
||||
rootWindow: root
|
||||
barConfig: root.barConfig
|
||||
leftWidgetsModel: root.leftWidgetsModel
|
||||
@@ -1,13 +1,13 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import qs.Common
|
||||
import qs.Modules.DankIsland
|
||||
import qs.Modules.DIsland
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
Item {
|
||||
id: barWindow
|
||||
readonly property var log: Log.scoped("DankBarBody")
|
||||
readonly property var log: Log.scoped("DBarBody")
|
||||
|
||||
required property var hostWindow
|
||||
required property var rootWindow
|
||||
@@ -1083,7 +1083,7 @@ Item {
|
||||
onWorkspaceSwitchRequested: direction => topBarContent.switchWorkspace(direction)
|
||||
}
|
||||
|
||||
DankBarContent {
|
||||
DBarContent {
|
||||
id: topBarContent
|
||||
barWindow: barWindow
|
||||
rootWindow: barWindow.rootWindow
|
||||
+14
-4
@@ -1,6 +1,6 @@
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
import qs.Modules.DankBar.Widgets
|
||||
import qs.Modules.DBar.Widgets
|
||||
import qs.Modules.SurfaceWidgets
|
||||
import qs.Services
|
||||
import "OverflowLayout.js" as OverflowLayout
|
||||
@@ -32,7 +32,14 @@ Item {
|
||||
readonly property real fittedLeadingReach: leadingImplicitSize > 0 ? leadingImplicitSize + sectionGap : 0
|
||||
readonly property real fittedTrailingReach: trailingImplicitSize > 0 ? trailingImplicitSize + sectionGap : 0
|
||||
readonly property var fittedCenterSection: _barIsVertical ? vCenterSection : hCenterSection
|
||||
property var overflowPlan: ({ hidden: { left: [], center: [], right: [] }, fits: true })
|
||||
property var overflowPlan: ({
|
||||
hidden: {
|
||||
left: [],
|
||||
center: [],
|
||||
right: []
|
||||
},
|
||||
fits: true
|
||||
})
|
||||
readonly property var overflowSections: _barIsVertical ? [vLeftSection, vCenterSection, vRightSection] : [hLeftSection, hCenterSection, hRightSection]
|
||||
readonly property real overflowLength: fitToWidgets ? barWindow.fittedAvailableLength : (_barIsVertical ? height : width)
|
||||
readonly property string overflowCenteringMode: SettingsData.centeringMode
|
||||
@@ -70,7 +77,10 @@ Item {
|
||||
confineCenter: fitToWidgets,
|
||||
restoreMargin: Theme.spacingS
|
||||
}, overflowPlan.hidden);
|
||||
const next = { hidden: result.hidden, fits: result.fits };
|
||||
const next = {
|
||||
hidden: result.hidden,
|
||||
fits: result.fits
|
||||
};
|
||||
if (JSON.stringify(next) !== JSON.stringify(overflowPlan))
|
||||
overflowPlan = next;
|
||||
}
|
||||
@@ -351,7 +361,7 @@ Item {
|
||||
return "left";
|
||||
}
|
||||
|
||||
DankBarHoverController {
|
||||
DBarHoverController {
|
||||
id: hoverController
|
||||
barContent: topBarContent
|
||||
barWindow: topBarContent.barWindow
|
||||
+3
-3
@@ -2,13 +2,13 @@ import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import qs.Common
|
||||
import qs.Modules.DankIsland
|
||||
import qs.Modules.DIsland
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
PanelWindow {
|
||||
id: barWindow
|
||||
readonly property var log: Log.scoped("DankBarWindow")
|
||||
readonly property var log: Log.scoped("DBarWindow")
|
||||
|
||||
required property var rootWindow
|
||||
required property var barConfig
|
||||
@@ -157,7 +157,7 @@ PanelWindow {
|
||||
}
|
||||
}
|
||||
|
||||
DankBarBody {
|
||||
DBarBody {
|
||||
id: body
|
||||
anchors.fill: parent
|
||||
hostWindow: barWindow
|
||||
+53
-13
@@ -56,16 +56,26 @@ function section(entries, hidden, spacing, triggerSize, triggerIndex) {
|
||||
positions[indices[index]] = position;
|
||||
}
|
||||
const middle = Math.floor(entries.length / 2);
|
||||
const anchor = { count: entries.length, middle: indices.indexOf(middle), previous: indices.indexOf(middle - 1) };
|
||||
return { sizes, indices, positions, buttonPosition, totalSize: layout.totalSize, anchor };
|
||||
const anchor = {
|
||||
count: entries.length,
|
||||
middle: indices.indexOf(middle),
|
||||
previous: indices.indexOf(middle - 1)
|
||||
};
|
||||
return {
|
||||
sizes,
|
||||
indices,
|
||||
positions,
|
||||
buttonPosition,
|
||||
totalSize: layout.totalSize,
|
||||
anchor
|
||||
};
|
||||
}
|
||||
|
||||
function measure(sections, hidden, options) {
|
||||
const names = ["left", "center", "right"];
|
||||
const layouts = {};
|
||||
for (const name of names) {
|
||||
layouts[name] = section(sections[name], hidden[name], options.spacing, options.triggerSize,
|
||||
options.positions?.[name] ?? defaultPosition(name, sections[name].length));
|
||||
layouts[name] = section(sections[name], hidden[name], options.spacing, options.triggerSize, options.positions?.[name] ?? defaultPosition(name, sections[name].length));
|
||||
}
|
||||
const min = options.start ?? 0;
|
||||
const max = options.length - (options.end ?? 0);
|
||||
@@ -81,9 +91,21 @@ function measure(sections, hidden, options) {
|
||||
const livePositions = centered.positions.filter(position => position !== null);
|
||||
const centerStart = livePositions.length ? Math.min(...livePositions) : 0;
|
||||
const intervals = {
|
||||
left: { start: min, end: min + leading, size: leading },
|
||||
center: { start: centerStart, end: centerStart + centered.totalSize, size: centered.totalSize },
|
||||
right: { start: max - trailing, end: max, size: trailing }
|
||||
left: {
|
||||
start: min,
|
||||
end: min + leading,
|
||||
size: leading
|
||||
},
|
||||
center: {
|
||||
start: centerStart,
|
||||
end: centerStart + centered.totalSize,
|
||||
size: centered.totalSize
|
||||
},
|
||||
right: {
|
||||
start: max - trailing,
|
||||
end: max,
|
||||
size: trailing
|
||||
}
|
||||
};
|
||||
const collisions = new Set();
|
||||
for (const name of names) {
|
||||
@@ -102,7 +124,12 @@ function measure(sections, hidden, options) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return { fits: collisions.size === 0, collisions: [...collisions], layouts, intervals };
|
||||
return {
|
||||
fits: collisions.size === 0,
|
||||
collisions: [...collisions],
|
||||
layouts,
|
||||
intervals
|
||||
};
|
||||
}
|
||||
|
||||
function resolve(sections, options, previous = {}) {
|
||||
@@ -132,7 +159,10 @@ function resolve(sections, options, previous = {}) {
|
||||
}
|
||||
eligible.sort((a, b) => Math.abs(a + 0.5 - position) - Math.abs(b + 0.5 - position));
|
||||
if (eligible.length) {
|
||||
candidate = { name, index: eligible[0] };
|
||||
candidate = {
|
||||
name,
|
||||
index: eligible[0]
|
||||
};
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -153,16 +183,24 @@ function resolve(sections, options, previous = {}) {
|
||||
for (const index of previous[name] ?? []) {
|
||||
if (sections[name][index]?.size > 0 && sections[name][index].mode === "auto" && !hidden[name].includes(index)) {
|
||||
hidden[name].push(index);
|
||||
restoring.push({ name, index });
|
||||
restoring.push({
|
||||
name,
|
||||
index
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const { name, index } of restoring) {
|
||||
for (const {
|
||||
name,
|
||||
index
|
||||
} of restoring) {
|
||||
const trial = {};
|
||||
for (const key of names)
|
||||
trial[key] = hidden[key].filter(value => key !== name || value !== index);
|
||||
const padded = Object.assign({}, sections, {
|
||||
[name]: sections[name].map((entry, entryIndex) => entryIndex === index ? Object.assign({}, entry, { size: entry.size + (options.restoreMargin ?? 0) }) : entry)
|
||||
[name]: sections[name].map((entry, entryIndex) => entryIndex === index ? Object.assign({}, entry, {
|
||||
size: entry.size + (options.restoreMargin ?? 0)
|
||||
}) : entry)
|
||||
});
|
||||
if (measure(padded, trial, options).fits)
|
||||
hidden[name] = trial[name];
|
||||
@@ -170,5 +208,7 @@ function resolve(sections, options, previous = {}) {
|
||||
const result = freshFits && !measure(sections, hidden, options).fits ? fresh : hidden;
|
||||
for (const name of names)
|
||||
result[name].sort((a, b) => a - b);
|
||||
return Object.assign({ hidden: result }, measure(sections, result, options));
|
||||
return Object.assign({
|
||||
hidden: result
|
||||
}, measure(sections, result, options));
|
||||
}
|
||||
+1
-1
@@ -3,7 +3,7 @@ import QtQuick.Window
|
||||
import qs.Common
|
||||
import qs.Widgets
|
||||
|
||||
DankPopout {
|
||||
DPopout {
|
||||
id: root
|
||||
|
||||
layerNamespace: "dms:battery"
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user