mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-06-11 00:47:22 +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.
44 lines
1.2 KiB
QML
44 lines
1.2 KiB
QML
// SPDX-FileCopyrightText: 2025 Florian Richer <florian.richer@protonmail.com>
|
|
// SPDX-License-Identifier: LGPL-2.0-or-later
|
|
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
import QtQuick.Controls as QQC2
|
|
|
|
import org.kde.plasma.components as PC3
|
|
import org.kde.kirigami as Kirigami
|
|
|
|
PC3.ToolButton {
|
|
id: root
|
|
opacity: 0.9
|
|
implicitHeight: Kirigami.Units.gridUnit * 4
|
|
implicitWidth: Kirigami.Units.gridUnit * 5
|
|
|
|
property string iconName
|
|
property string textLabel
|
|
|
|
contentItem: ColumnLayout {
|
|
spacing: Kirigami.Units.largeSpacing
|
|
uniformCellSizes: true
|
|
|
|
Kirigami.Icon {
|
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
|
implicitWidth: Kirigami.Units.iconSizes.smallMedium
|
|
implicitHeight: Kirigami.Units.iconSizes.smallMedium
|
|
Layout.fillHeight: true
|
|
source: iconName
|
|
isMask: true
|
|
color: Kirigami.Theme.textColor
|
|
}
|
|
|
|
QQC2.Label {
|
|
horizontalAlignment: Text.AlignHCenter
|
|
verticalAlignment: Text.AlignTop
|
|
text: textLabel
|
|
font.bold: true
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
wrapMode: Text.WordWrap
|
|
}
|
|
}
|
|
}
|