mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-01 01:07:33 +00:00
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.
This commit is contained in:
parent
08133712c7
commit
49e7102f7b
5 changed files with 6 additions and 5 deletions
|
|
@ -10,7 +10,7 @@ import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS
|
||||||
|
|
||||||
QS.QuickSetting {
|
QS.QuickSetting {
|
||||||
text: i18n("Airplane Mode")
|
text: i18n("Airplane Mode")
|
||||||
icon: "network-flightmode-on"
|
icon: PlasmaNM.Configuration.airplaneModeEnabled ? "network-flightmode-on" : "network-flightmode-off"
|
||||||
status: ""
|
status: ""
|
||||||
enabled: PlasmaNM.Configuration.airplaneModeEnabled
|
enabled: PlasmaNM.Configuration.airplaneModeEnabled
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS
|
||||||
|
|
||||||
QS.QuickSetting {
|
QS.QuickSetting {
|
||||||
text: i18n("Sound")
|
text: i18n("Sound")
|
||||||
icon: "audio-speakers-symbolic"
|
icon: MobileShell.AudioInfo.icon
|
||||||
status: i18n("%1%", MobileShell.AudioInfo.volumeValue)
|
status: i18n("%1%", MobileShell.AudioInfo.volumeValue)
|
||||||
enabled: false
|
enabled: false
|
||||||
settingsCommand: "plasma-open-settings kcm_pulseaudio"
|
settingsCommand: "plasma-open-settings kcm_pulseaudio"
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
|
|
||||||
import org.kde.bluezqt 1.0 as BluezQt
|
import org.kde.bluezqt 1.0 as BluezQt
|
||||||
|
import org.kde.plasma.private.mobileshell as MobileShell
|
||||||
import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS
|
import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS
|
||||||
|
|
||||||
QS.QuickSetting {
|
QS.QuickSetting {
|
||||||
|
|
@ -13,7 +14,7 @@ QS.QuickSetting {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
text: i18n("Bluetooth")
|
text: i18n("Bluetooth")
|
||||||
icon: "network-bluetooth"
|
icon: MobileShell.BluetoothInfo.icon
|
||||||
settingsCommand: "plasma-open-settings kcm_bluetooth"
|
settingsCommand: "plasma-open-settings kcm_bluetooth"
|
||||||
function toggle() {
|
function toggle() {
|
||||||
const enable = !btManager.bluetoothOperational;
|
const enable = !btManager.bluetoothOperational;
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS
|
||||||
|
|
||||||
QS.QuickSetting {
|
QS.QuickSetting {
|
||||||
text: i18n("Flashlight")
|
text: i18n("Flashlight")
|
||||||
icon: "flashlight-on"
|
icon: FlashlightUtil.torchEnabled ? "flashlight-on" : "flashlight-off"
|
||||||
enabled: FlashlightUtil.torchEnabled
|
enabled: FlashlightUtil.torchEnabled
|
||||||
available: FlashlightUtil.available
|
available: FlashlightUtil.available
|
||||||
function toggle() {
|
function toggle() {
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ QS.QuickSetting {
|
||||||
|
|
||||||
text: i18n("Wi-Fi")
|
text: i18n("Wi-Fi")
|
||||||
status: enabledConnections.wirelessEnabled ? wirelessStatus.wifiSSID : ""
|
status: enabledConnections.wirelessEnabled ? wirelessStatus.wifiSSID : ""
|
||||||
icon: "network-wireless-signal"
|
icon: enabledConnections.wirelessEnabled ? "network-wireless" : "network-wireless-disconnected"
|
||||||
settingsCommand: "plasma-open-settings kcm_mobile_wifi"
|
settingsCommand: "plasma-open-settings kcm_mobile_wifi"
|
||||||
function toggle() {
|
function toggle() {
|
||||||
nmHandler.enableWireless(!enabledConnections.wirelessEnabled)
|
nmHandler.enableWireless(!enabledConnections.wirelessEnabled)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue