nix/nixos/desktop/quickshell/ui/StatRow.qml
Markus Zoppelt bbf5b713c9 fix: harden Quickshell launches, folder opens, and untrusted UI
Stop systemd-run option injection, open Syncthing folders only via a
store-pinned real-directory helper, treat labels as PlainText, and
allowlist image URLs.
2026-08-26 17:11:21 +02:00

55 lines
1.3 KiB
QML

import QtQuick
import ".."
Column {
id: root
property string label: ""
property string value: ""
property string detail: ""
property var ink
property real ratio: -1
width: parent ? parent.width : 360
spacing: 4
Item {
width: parent.width
implicitHeight: 18
Text {
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
text: label
textFormat: Text.PlainText
color: Theme.fg
font.family: Theme.font
font.pixelSize: 14
}
Text {
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
text: value
textFormat: Text.PlainText
color: root.ink || (ratio >= 0.9 ? Theme.red : Theme.fg)
font.family: Theme.font
font.pixelSize: 13
}
}
Meter {
visible: ratio >= 0
width: parent.width
value: ratio
}
Text {
visible: root.detail !== ""
width: parent.width
text: root.detail
textFormat: Text.PlainText
color: Theme.comment
font.family: Theme.font
font.pixelSize: 12
elide: Text.ElideRight
}
}