mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-06-11 16:57:43 +00:00
Kirigami.Icon { isMask: true } flattens an SVG to its alpha, so when a quick-setting tile resolves to a colored preferences/scalable glyph the whole rounded background collapses into a solid square. Append -symbolic to the five icon names that collided with colored tiles and add symlink aliases where no real symbolic variant exists yet. Guard the regression with a check in tests/check-shift-icon-theme.sh.
26 lines
786 B
QML
26 lines
786 B
QML
// SPDX-FileCopyrightText: 2022 Yari Polla <skilvingr@gmail.com>
|
|
// SPDX-License-Identifier: LGPL-2.0-or-later
|
|
|
|
import QtQuick 2.15
|
|
|
|
import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS
|
|
import org.kde.plasma.private.mobileshell as MobileShell
|
|
|
|
QS.QuickSetting {
|
|
id: root
|
|
|
|
text: i18n("Hotspot")
|
|
icon: "network-wireless-hotspot-symbolic"
|
|
|
|
enabled: MobileShell.NetworkInfo.wirelessStatus.hotspotSSID.length !== 0
|
|
status: enabled ? MobileShell.NetworkInfo.wirelessStatus.hotspotSSID : ""
|
|
|
|
settingsCommand: "plasma-open-settings kcm_mobile_hotspot"
|
|
function toggle() {
|
|
if (!enabled) {
|
|
MobileShell.NetworkInfo.handler.createHotspot();
|
|
} else {
|
|
MobileShell.NetworkInfo.handler.stopHotspot();
|
|
}
|
|
}
|
|
}
|