summaryrefslogtreecommitdiff
path: root/package/contents/ui/CompactRepresentation.qml
diff options
context:
space:
mode:
Diffstat (limited to 'package/contents/ui/CompactRepresentation.qml')
-rw-r--r--package/contents/ui/CompactRepresentation.qml33
1 files changed, 33 insertions, 0 deletions
diff --git a/package/contents/ui/CompactRepresentation.qml b/package/contents/ui/CompactRepresentation.qml
new file mode 100644
index 0000000..85d62ee
--- /dev/null
+++ b/package/contents/ui/CompactRepresentation.qml
@@ -0,0 +1,33 @@
+import QtQuick 6.0
+import QtQuick.Layouts 6.0
+import org.kde.plasma.components 3.0 as PlasmaComponents
+
+RowLayout {
+ IconUtils { id: icons }
+ FormatUtils { id: fmt }
+ spacing: 4
+
+ PlasmaComponents.Label {
+ text: icons.getDirectionIcon(root.direction)
+ font.pointSize: 12
+ }
+
+ PlasmaComponents.Label {
+ text: icons.getBatteryIcon(root.batterySoc)
+ font.pointSize: 12
+ }
+
+ PlasmaComponents.Label {
+ text: fmt.formatSoc(root.batterySoc)
+ font.pointSize: 10
+ font.bold: true
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ acceptedButtons: Qt.LeftButton
+ onClicked: (mouse) => {
+ root.expanded = !root.expanded
+ }
+ }
+}