1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-27 06:52:50 -05:00

settings: add IPCs to open specific settings tabs

This commit is contained in:
bbedward
2025-12-04 14:31:20 -05:00
parent 2aabee453b
commit 397a8c275d
9 changed files with 256 additions and 35 deletions

View File

@@ -11,7 +11,17 @@ Item {
if (!item)
return;
const windowContentItem = item.Window.window?.contentItem;
let windowContentItem = item.Window?.window?.contentItem;
if (!windowContentItem) {
let current = item;
while (current) {
if (current.Window?.window?.contentItem) {
windowContentItem = current.Window.window.contentItem;
break;
}
current = current.parent;
}
}
if (!windowContentItem)
return;

View File

@@ -21,29 +21,29 @@ MouseArea {
color: Qt.rgba(stateColor.r, stateColor.g, stateColor.b, stateOpacity)
}
Timer {
id: hoverDelay
interval: 1000
repeat: false
onTriggered: {
const p = root.mapToItem(null, parent.width / 2, parent.height + Theme.spacingXS)
tooltip.show(I18n.tr(""), p.x, p.y, null)
tooltip.show(root.tooltipText, root, 0, 0, "bottom");
}
}
onEntered: {
if (!tooltipText) { return }
hoverDelay.restart()
if (!tooltipText)
return;
hoverDelay.restart();
}
onExited: {
if (!tooltipText) { return }
hoverDelay.stop()
tooltip.hide()
if (!tooltipText)
return;
hoverDelay.stop();
tooltip.hide();
}
DankTooltip {
DankTooltipV2 {
id: tooltip
}
}

View File

@@ -133,6 +133,18 @@ Rectangle {
onClicked: DMSNetworkService.disconnectAllActive()
}
}
DankActionButton {
Layout.alignment: Qt.AlignVCenter
iconName: "settings"
buttonSize: 28
iconSize: 16
iconColor: Theme.surfaceVariantText
onClicked: {
PopoutService.closeControlCenter();
PopoutService.openSettingsWithTab("network");
}
}
}
Rectangle {