quickshell-toki-night/modules/dashboard/dash/User.qml

73 lines
1.6 KiB
QML

import qs.config
import qs.custom
import qs.services
import qs.util
import Quickshell
import QtQuick
Column {
id: root
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 24
Item {
id: userLine
implicitWidth: childrenRect.width
implicitHeight: childrenRect.height
MaterialIcon {
id: userIcon
anchors.left: parent.left
text: "account_circle"
fill: 1
color: Config.colors.primary
font.pointSize: Config.font.size.larger
}
CustomText {
id: userText
anchors.verticalCenter: userIcon.verticalCenter
anchors.left: userIcon.right
anchors.leftMargin: 7
text: qsTr("User: %1").arg(User.user)
color: Config.colors.secondary
}
}
Item {
id: uptimeLine
implicitWidth: childrenRect.width
implicitHeight: childrenRect.height
MaterialIcon {
id: uptimeIcon
anchors.left: parent.left
text: "timer"
fill: 1
color: Config.colors.primary
font.pointSize: Config.font.size.larger
}
CustomText {
id: uptimeText
anchors.verticalCenter: uptimeIcon.verticalCenter
anchors.left: uptimeIcon.right
anchors.verticalCenterOffset: 1
anchors.leftMargin: 7
text: qsTr("Uptime: %1").arg(User.uptime)
color: Config.colors.secondary
}
}
}