mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-06-11 08:57:21 +00:00
Use masked Kirigami icons with explicit theme colors for shell controls so the Shift icon theme renders reliably across light and dark surfaces. Replace the status-bar battery helper with theme icon names so battery glyphs also come from org.shift.icons. Give the app-thumbnail close affordance a symbolic white X on a dark circular backing so it remains visible over previews.
50 lines
1.4 KiB
QML
50 lines
1.4 KiB
QML
/*
|
|
SPDX-FileCopyrightText: 2021 Devin Lin <espidev@gmail.com>
|
|
SPDX-FileCopyrightText: 2019 Marco Martin <mart@kde.org>
|
|
SPDX-FileCopyrightText: 2013-2017 Jan Grulich <jgrulich@redhat.com>
|
|
|
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
|
*/
|
|
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
import QtQuick.Controls as QQC2
|
|
import org.kde.plasma.networkmanagement as PlasmaNM
|
|
import org.kde.kirigami as Kirigami
|
|
|
|
Item {
|
|
id: connectionIcon
|
|
|
|
readonly property string icon: wirelessStatus.hotspotSSID.length !== 0 ? "network-wireless-hotspot" : connectionIconProvider.connectionIcon
|
|
readonly property bool indicatorRunning: connectionIconProvider.connecting
|
|
|
|
readonly property var wirelessStatus: PlasmaNM.WirelessStatus {
|
|
id: wirelessStatus
|
|
}
|
|
|
|
readonly property var connectionIcon: PlasmaNM.ConnectionIcon {
|
|
id: connectionIconProvider
|
|
}
|
|
|
|
// Internet icon, only show while visible
|
|
Kirigami.Icon {
|
|
id: internetIcon
|
|
|
|
anchors.fill: parent
|
|
visible: !connectingIndicator.visible
|
|
source: connectionIcon.icon
|
|
Kirigami.Theme.inherit: false
|
|
Kirigami.Theme.colorSet: Kirigami.Theme.Window
|
|
isMask: true
|
|
color: Kirigami.Theme.textColor
|
|
}
|
|
|
|
// Connecting indicator
|
|
QQC2.BusyIndicator {
|
|
id: connectingIndicator
|
|
|
|
anchors.fill: parent
|
|
running: connectionIcon.indicatorRunning
|
|
visible: running
|
|
}
|
|
}
|