fixing singleton in helpers for network + getting output from systray
This commit is contained in:
@@ -40,10 +40,6 @@ JsonObject {
|
|||||||
id: "tray",
|
id: "tray",
|
||||||
enabled: true
|
enabled: true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
id: "network",
|
|
||||||
enabled: false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: "clock",
|
id: "clock",
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|||||||
+3
-9
@@ -1,16 +1,10 @@
|
|||||||
pragma ComponentBehavior: Bound
|
pragma Singleton
|
||||||
|
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Networking
|
import Quickshell.Networking
|
||||||
import qs.Components
|
|
||||||
import qs.Config
|
|
||||||
import qs.Modules
|
|
||||||
import qs.Helpers as Helpers
|
|
||||||
|
|
||||||
item {
|
Singleton {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
function networkScan() {
|
readonly property list<NetworkDevice> network: Networking.devices.values
|
||||||
Networking.scanForNetworks();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,41 +1,44 @@
|
|||||||
pragma ComponentBehavior: Bound
|
pragma ComponentBehavior: Bound
|
||||||
|
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Networking
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import qs.Components
|
import qs.Components
|
||||||
import qs.Config
|
import qs.Config
|
||||||
import qs.Modules
|
import qs.Modules
|
||||||
import qs.Helpers as Helpers
|
import qs.Helpers
|
||||||
|
|
||||||
Item {
|
CustomClippingRect {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property var wrapper
|
required property var wrapper
|
||||||
|
|
||||||
implicitHeight: networkPop.implicitHeight
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
implicitWidth: networkPop.implicitWidth
|
color: DynamicColors.tPalette.m3surfaceContainer
|
||||||
|
implicitHeight: 500 + 5 * 2
|
||||||
|
implicitWidth: 500 + 8 * 2
|
||||||
|
radius: (20 - Appearance.padding.small) * Appearance.rounding.scale
|
||||||
|
|
||||||
CustomRect {
|
Item {
|
||||||
id: networkPop
|
id: networkPopContent
|
||||||
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.fill: parent
|
||||||
color: DynamicColors.tPalette.m3surfaceContainer
|
anchors.margins: Appearance.padding.small
|
||||||
implicitHeight: 500 + 5 * 2
|
|
||||||
implicitWidth: 500 + 8 * 2
|
|
||||||
radius: (20 - Appearance.padding.small) * Appearance.rounding.scale
|
|
||||||
|
|
||||||
Item {
|
CustomText {
|
||||||
id: networkPopContent
|
anchors.left: parent.left
|
||||||
|
anchors.margins: Appearance.padding.large
|
||||||
|
anchors.top: parent.top
|
||||||
|
font.pointSize: Appearance.font.size.large
|
||||||
|
text: qsTr("Network")
|
||||||
|
}
|
||||||
|
|
||||||
anchors.fill: parent
|
StateLayer {
|
||||||
anchors.margins: Appearance.padding.small
|
id: buttonScan
|
||||||
|
|
||||||
// text {
|
onClicked: {
|
||||||
// font.pixelSize: 20
|
console.log(Network.network.length);
|
||||||
// text: qsTr("Network Settings")
|
}
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user