1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-27 23:12:49 -05:00

network: listen to NM Wired interface + use nmcli for route metrics

- Some other misc floating window change, too lazy to separate the
  commit
This commit is contained in:
bbedward
2026-01-06 16:01:28 -05:00
parent c45eb2cccf
commit c1fbeb3f5e
16 changed files with 285 additions and 188 deletions

View File

@@ -6,6 +6,7 @@ Item {
readonly property real edgeSize: 8
required property var targetWindow
property bool supported: typeof targetWindow.startSystemMove === "function"
readonly property bool canMaximize: targetWindow.minimumSize.width !== targetWindow.maximumSize.width || targetWindow.minimumSize.height !== targetWindow.maximumSize.height
anchors.fill: parent
@@ -16,19 +17,19 @@ Item {
}
function tryStartResize(edges) {
if (!supported)
if (!supported || !canMaximize)
return;
targetWindow.startSystemResize(edges);
}
function tryToggleMaximize() {
if (!supported)
if (!supported || !canMaximize)
return;
targetWindow.maximized = !targetWindow.maximized;
}
MouseArea {
visible: root.supported
visible: root.supported && root.canMaximize
height: root.edgeSize
anchors.left: parent.left
anchors.right: parent.right
@@ -40,7 +41,7 @@ Item {
}
MouseArea {
visible: root.supported
visible: root.supported && root.canMaximize
width: root.edgeSize
anchors.left: parent.left
anchors.top: parent.top
@@ -52,7 +53,7 @@ Item {
}
MouseArea {
visible: root.supported
visible: root.supported && root.canMaximize
width: root.edgeSize
anchors.right: parent.right
anchors.top: parent.top
@@ -64,7 +65,7 @@ Item {
}
MouseArea {
visible: root.supported
visible: root.supported && root.canMaximize
width: root.edgeSize
height: root.edgeSize
anchors.left: parent.left
@@ -74,7 +75,7 @@ Item {
}
MouseArea {
visible: root.supported
visible: root.supported && root.canMaximize
width: root.edgeSize
height: root.edgeSize
anchors.right: parent.right
@@ -84,7 +85,7 @@ Item {
}
MouseArea {
visible: root.supported
visible: root.supported && root.canMaximize
height: root.edgeSize
anchors.left: parent.left
anchors.right: parent.right
@@ -96,7 +97,7 @@ Item {
}
MouseArea {
visible: root.supported
visible: root.supported && root.canMaximize
width: root.edgeSize
height: root.edgeSize
anchors.left: parent.left
@@ -106,7 +107,7 @@ Item {
}
MouseArea {
visible: root.supported
visible: root.supported && root.canMaximize
width: root.edgeSize
height: root.edgeSize
anchors.right: parent.right