mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-05 21:18:30 -04:00
Merge branch 'master' of github.com:AvengeMedia/DankMaterialShell
This commit is contained in:
@@ -230,21 +230,6 @@ DankPopout {
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
StyledText {
|
||||
id: hiddenRow
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: backendsRow.visible ? backendsRow.bottom : header.bottom
|
||||
anchors.leftMargin: Theme.spacingL
|
||||
anchors.rightMargin: Theme.spacingL
|
||||
anchors.topMargin: Theme.spacingXS
|
||||
visible: SystemUpdateService.hiddenUpdateCount > 0 && !SystemUpdateService.isUpgrading
|
||||
text: I18n.tr("%1 hidden (AUR disabled or ignored)").arg(SystemUpdateService.hiddenUpdateCount)
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceVariantText
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
Row {
|
||||
id: buttonsRow
|
||||
anchors.left: parent.left
|
||||
@@ -340,7 +325,7 @@ DankPopout {
|
||||
id: bodyArea
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: hiddenRow.visible ? hiddenRow.bottom : (backendsRow.visible ? backendsRow.bottom : header.bottom)
|
||||
anchors.top: backendsRow.visible ? backendsRow.bottom : header.bottom
|
||||
anchors.bottom: buttonsRow.top
|
||||
anchors.leftMargin: Theme.spacingL
|
||||
anchors.rightMargin: Theme.spacingL
|
||||
|
||||
@@ -2101,6 +2101,14 @@ Item {
|
||||
delegateRoot.updateAllData();
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: CompositorService.isHyprland ? Hyprland : null
|
||||
enabled: CompositorService.isHyprland
|
||||
function onRawEvent(event) {
|
||||
if (event.name === "activewindow" || event.name === "activewindowv2")
|
||||
delegateRoot.updateAllData();
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: I3.workspaces
|
||||
enabled: (CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle)
|
||||
|
||||
@@ -226,6 +226,13 @@ DankPopout {
|
||||
LayoutMirroring.enabled: I18n.isRtl
|
||||
LayoutMirroring.childrenInherit: true
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
z: -1
|
||||
enabled: root.__dropdownType !== 0
|
||||
onClicked: root.__hideDropdowns()
|
||||
}
|
||||
|
||||
implicitWidth: Math.max(700, pages.implicitWidth + (Theme.spacingM * 2))
|
||||
implicitHeight: contentColumn.height + Theme.spacingM * 2
|
||||
color: "transparent"
|
||||
|
||||
@@ -6,6 +6,7 @@ import qs.Widgets
|
||||
|
||||
Item {
|
||||
id: root
|
||||
visible: dropdownType !== 0
|
||||
|
||||
LayoutMirroring.enabled: I18n.isRtl
|
||||
LayoutMirroring.childrenInherit: true
|
||||
@@ -582,10 +583,4 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
z: -1
|
||||
enabled: dropdownType !== 0
|
||||
onClicked: closeRequested()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,9 +256,8 @@ Singleton {
|
||||
function getDevicePath(device) {
|
||||
if (!device || !device.address) {
|
||||
return "";
|
||||
}
|
||||
const adapterPath = adapter ? "/org/bluez/hci0" : "/org/bluez/hci0";
|
||||
return `${adapterPath}/dev_${device.address.replace(/:/g, "_")}`;
|
||||
}
|
||||
return device.dbusPath ?? "";
|
||||
}
|
||||
|
||||
function isAudioDevice(device) {
|
||||
|
||||
@@ -246,13 +246,14 @@ Singleton {
|
||||
|
||||
function sendSubscribeRequest() {
|
||||
const request = {
|
||||
"method": "subscribe"
|
||||
"method": "subscribe",
|
||||
"params": {
|
||||
"clientId": dbusClientId
|
||||
}
|
||||
};
|
||||
|
||||
if (activeSubscriptions.length > 0) {
|
||||
request.params = {
|
||||
"services": activeSubscriptions
|
||||
};
|
||||
request.params.services = activeSubscriptions;
|
||||
log.debug("Subscribing to services:", JSON.stringify(activeSubscriptions));
|
||||
} else {
|
||||
log.debug("Subscribing to all services");
|
||||
@@ -672,6 +673,7 @@ Singleton {
|
||||
|
||||
signal dbusSignalReceived(string subscriptionId, var data)
|
||||
|
||||
readonly property string dbusClientId: "dms-qml-" + Date.now() + "-" + Math.floor(Math.random() * 0xffffffff)
|
||||
property var dbusSubscriptions: ({})
|
||||
|
||||
function dbusCall(bus, dest, path, iface, method, args, callback) {
|
||||
@@ -735,7 +737,8 @@ Singleton {
|
||||
"sender": sender || "",
|
||||
"path": path || "",
|
||||
"interface": iface || "",
|
||||
"member": member || ""
|
||||
"member": member || "",
|
||||
"clientId": dbusClientId
|
||||
}, response => {
|
||||
if (!response.error && response.result?.subscriptionId) {
|
||||
dbusSubscriptions[response.result.subscriptionId] = true;
|
||||
|
||||
@@ -33,7 +33,6 @@ Singleton {
|
||||
property int nextCheckUnix: 0
|
||||
|
||||
readonly property int updateCount: availableUpdates.length
|
||||
readonly property int hiddenUpdateCount: _rawUpdates.length - availableUpdates.length
|
||||
readonly property bool helperAvailable: sysupdateAvailable && backends.length > 0
|
||||
|
||||
Connections {
|
||||
|
||||
@@ -996,18 +996,53 @@ Item {
|
||||
height: root.renderedAlignedHeight + contentContainer.verticalConnectorExtent * 2
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
enabled: shouldBeVisible && backgroundInteractive
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
|
||||
Item {
|
||||
id: backgroundClickCatcher
|
||||
z: -1
|
||||
onClicked: mouse => {
|
||||
const clickX = mouse.x;
|
||||
const clickY = mouse.y;
|
||||
const outsideContent = clickX < root.alignedX || clickX > root.alignedX + root.alignedWidth || clickY < root.renderedAlignedY || clickY > root.renderedAlignedY + root.renderedAlignedHeight;
|
||||
if (!outsideContent)
|
||||
return;
|
||||
backgroundClicked();
|
||||
enabled: shouldBeVisible && backgroundInteractive
|
||||
x: 0
|
||||
y: 0
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
|
||||
// Four edge strips that exclude the popup body, so cursor shapes
|
||||
// inside the content propagate correctly (full-screen MouseAreas
|
||||
// at z:-1 can suppress child cursorShape on Wayland).
|
||||
MouseArea {
|
||||
x: 0
|
||||
y: 0
|
||||
width: parent.width
|
||||
height: root.renderedAlignedY
|
||||
enabled: parent.enabled
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
|
||||
onClicked: backgroundClicked()
|
||||
}
|
||||
MouseArea {
|
||||
x: 0
|
||||
y: root.renderedAlignedY + root.renderedAlignedHeight
|
||||
width: parent.width
|
||||
height: Math.max(0, parent.height - root.renderedAlignedY - root.renderedAlignedHeight)
|
||||
enabled: parent.enabled
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
|
||||
onClicked: backgroundClicked()
|
||||
}
|
||||
MouseArea {
|
||||
x: 0
|
||||
y: root.renderedAlignedY
|
||||
width: root.alignedX
|
||||
height: root.renderedAlignedHeight
|
||||
enabled: parent.enabled
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
|
||||
onClicked: backgroundClicked()
|
||||
}
|
||||
MouseArea {
|
||||
x: root.alignedX + root.alignedWidth
|
||||
y: root.renderedAlignedY
|
||||
width: Math.max(0, parent.width - root.alignedX - root.alignedWidth)
|
||||
height: root.renderedAlignedHeight
|
||||
enabled: parent.enabled
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
|
||||
onClicked: backgroundClicked()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user