lock: use Rows instead of RowLayouts

This commit is contained in:
end-4
2025-09-28 13:47:40 +02:00
parent 0f6c076dda
commit 7237dd053d
@@ -155,21 +155,21 @@ MouseArea {
opacity: root.toolbarOpacity opacity: root.toolbarOpacity
// Username // Username
RowLayout { Row {
spacing: 6 spacing: 6
Layout.leftMargin: 8 Layout.leftMargin: 8
Layout.fillHeight: true Layout.fillHeight: true
MaterialSymbol { MaterialSymbol {
id: userIcon id: userIcon
Layout.alignment: Qt.AlignVCenter anchors.verticalCenter: parent.verticalCenter
fill: 1 fill: 1
text: "account_circle" text: "account_circle"
iconSize: Appearance.font.pixelSize.huge iconSize: Appearance.font.pixelSize.huge
color: Appearance.colors.colOnSurfaceVariant color: Appearance.colors.colOnSurfaceVariant
} }
StyledText { StyledText {
Layout.alignment: Qt.AlignVCenter anchors.verticalCenter: parent.verticalCenter
text: SystemInfo.username text: SystemInfo.username
color: Appearance.colors.colOnSurfaceVariant color: Appearance.colors.colOnSurfaceVariant
} }
@@ -184,18 +184,19 @@ MouseArea {
active: true active: true
visible: active visible: active
sourceComponent: RowLayout { sourceComponent: Row {
spacing: 8 spacing: 8
MaterialSymbol { MaterialSymbol {
id: keyboardIcon id: keyboardIcon
Layout.alignment: Qt.AlignVCenter anchors.verticalCenter: parent.verticalCenter
fill: 1 fill: 1
text: "keyboard_alt" text: "keyboard_alt"
iconSize: Appearance.font.pixelSize.huge iconSize: Appearance.font.pixelSize.huge
color: Appearance.colors.colOnSurfaceVariant color: Appearance.colors.colOnSurfaceVariant
} }
Loader { Loader {
anchors.verticalCenter: parent.verticalCenter
sourceComponent: StyledText { sourceComponent: StyledText {
text: HyprlandXkb.currentLayoutCode text: HyprlandXkb.currentLayoutCode
color: Appearance.colors.colOnSurfaceVariant color: Appearance.colors.colOnSurfaceVariant
@@ -229,18 +230,18 @@ MouseArea {
scale: root.toolbarScale scale: root.toolbarScale
opacity: root.toolbarOpacity opacity: root.toolbarOpacity
RowLayout { Row {
visible: UPower.displayDevice.isLaptopBattery visible: UPower.displayDevice.isLaptopBattery
spacing: 6 spacing: 4
Layout.fillHeight: true Layout.fillHeight: true
Layout.leftMargin: 10 Layout.leftMargin: 10
Layout.rightMargin: 10 Layout.rightMargin: 10
MaterialSymbol { MaterialSymbol {
id: boltIcon id: boltIcon
Layout.alignment: Qt.AlignVCenter anchors {
Layout.leftMargin: -2 verticalCenter: parent.verticalCenter
Layout.rightMargin: -2 }
fill: 1 fill: 1
text: Battery.isCharging ? "bolt" : "battery_android_full" text: Battery.isCharging ? "bolt" : "battery_android_full"
iconSize: Appearance.font.pixelSize.huge iconSize: Appearance.font.pixelSize.huge
@@ -248,7 +249,7 @@ MouseArea {
color: (Battery.isLow && !Battery.isCharging) ? Appearance.colors.colError : Appearance.colors.colOnSurfaceVariant color: (Battery.isLow && !Battery.isCharging) ? Appearance.colors.colError : Appearance.colors.colOnSurfaceVariant
} }
StyledText { StyledText {
Layout.alignment: Qt.AlignVCenter anchors.verticalCenter: parent.verticalCenter
text: Math.round(Battery.percentage * 100) text: Math.round(Battery.percentage * 100)
color: (Battery.isLow && !Battery.isCharging) ? Appearance.colors.colError : Appearance.colors.colOnSurfaceVariant color: (Battery.isLow && !Battery.isCharging) ? Appearance.colors.colError : Appearance.colors.colOnSurfaceVariant
} }