shift-shell/quicksettings/wifi/contents/ui/main.qml
Mr. Athozus 49e7102f7b quicksettings: Use adaptative icons
Personnaly, I don't like much those static icons which doesn't care about the situation in the quicksettings. This MR intends to use when possible and coherent what I call (not native English-speaking I recall) « adaptive » icon.

List of modified quicksettings :
- Wireless
- Bluetooth
- Flashlight
- Audio
- Airplane mode

~~Draft right now because I'm doing it quicksetting-by-quicksetting.~~

EDIT: Feel free to cherry-pick if you don't agree with all icons.
2024-07-01 01:56:48 +00:00

30 lines
865 B
QML

// SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
// SPDX-License-Identifier: LGPL-2.0-or-later
import QtQuick 2.15
import org.kde.plasma.networkmanagement as PlasmaNM
import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS
QS.QuickSetting {
PlasmaNM.Handler {
id: nmHandler
}
PlasmaNM.EnabledConnections {
id: enabledConnections
}
PlasmaNM.WirelessStatus {
id: wirelessStatus
}
text: i18n("Wi-Fi")
status: enabledConnections.wirelessEnabled ? wirelessStatus.wifiSSID : ""
icon: enabledConnections.wirelessEnabled ? "network-wireless" : "network-wireless-disconnected"
settingsCommand: "plasma-open-settings kcm_mobile_wifi"
function toggle() {
nmHandler.enableWireless(!enabledConnections.wirelessEnabled)
}
enabled: enabledConnections.wirelessEnabled
}