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:
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user