|
|
|
@ -145,13 +145,13 @@ Item {
|
|
|
|
onRightClicked: toggleDialog()
|
|
|
|
onRightClicked: toggleDialog()
|
|
|
|
|
|
|
|
|
|
|
|
function toggleDialog() {
|
|
|
|
function toggleDialog() {
|
|
|
|
if (controlDialog.visible)
|
|
|
|
if (controlCenter.visible)
|
|
|
|
controlDialog.visible = false
|
|
|
|
controlCenter.visible = false
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
// 先初始化,用户可能会通过Alt鼠标左键移动位置
|
|
|
|
// 先初始化,用户可能会通过Alt鼠标左键移动位置
|
|
|
|
controlDialog.position = Qt.point(0, 0)
|
|
|
|
controlCenter.position = Qt.point(0, 0)
|
|
|
|
controlDialog.visible = true
|
|
|
|
controlCenter.visible = true
|
|
|
|
controlDialog.position = Qt.point(mapToGlobal(0, 0).x, mapToGlobal(0, 0).y)
|
|
|
|
controlCenter.position = Qt.point(mapToGlobal(0, 0).x, mapToGlobal(0, 0).y)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -179,12 +179,12 @@ Item {
|
|
|
|
width: rootItem.iconSize
|
|
|
|
width: rootItem.iconSize
|
|
|
|
height: width
|
|
|
|
height: width
|
|
|
|
sourceSize: Qt.size(width, height)
|
|
|
|
sourceSize: Qt.size(width, height)
|
|
|
|
source: network.wirelessIconName ? "qrc:/images/" + (FishUI.Theme.darkMode ? "dark/" : "light/") + network.wirelessIconName + ".svg" : ""
|
|
|
|
source: activeConnection.wirelessIcon ? "qrc:/images/" + (FishUI.Theme.darkMode ? "dark/" : "light/") + activeConnection.wirelessIcon + ".svg" : ""
|
|
|
|
asynchronous: true
|
|
|
|
asynchronous: true
|
|
|
|
Layout.alignment: Qt.AlignCenter
|
|
|
|
Layout.alignment: Qt.AlignCenter
|
|
|
|
visible: network.enabled &&
|
|
|
|
visible: enabledConnections.wirelessHwEnabled &&
|
|
|
|
network.wirelessEnabled &&
|
|
|
|
enabledConnections.wirelessEnabled &&
|
|
|
|
network.wirelessConnectionName !== "" &&
|
|
|
|
activeConnection.wirelessName &&
|
|
|
|
wirelessIcon.status === Image.Ready
|
|
|
|
wirelessIcon.status === Image.Ready
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -230,8 +230,8 @@ Item {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Components
|
|
|
|
// Components
|
|
|
|
ControlDialog {
|
|
|
|
ControlCenter {
|
|
|
|
id: controlDialog
|
|
|
|
id: controlCenter
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Volume {
|
|
|
|
Volume {
|
|
|
|
@ -242,11 +242,15 @@ Item {
|
|
|
|
id: battery
|
|
|
|
id: battery
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
NM.ConnectionIcon {
|
|
|
|
NM.ActiveConnection {
|
|
|
|
id: connectionIconProvider
|
|
|
|
id: activeConnection
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
NM.Network {
|
|
|
|
NM.EnabledConnections {
|
|
|
|
id: network
|
|
|
|
id: enabledConnections
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NM.Handler {
|
|
|
|
|
|
|
|
id: nmHandler
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|