Commit dde0f20b authored by Nate Graham's avatar Nate Graham
Browse files

Top-align lock/login/logout screen action buttons

This way the icons are always vertically aligned even when some of
their labels are multi-line strings.

BUG: 450238
FIXED-IN: 5.24.2
parent c2bd76ac
Pipeline #138678 passed with stage
in 5 minutes and 50 seconds
......@@ -100,7 +100,7 @@ FocusScope {
Row { //deliberately not rowlayout as I'm not trying to resize child items
id: actionItemsLayout
spacing: PlasmaCore.Units.largeSpacing / 2
Layout.alignment: Qt.AlignHCenter
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
  • I'm having hard times trying to understand: how pinning the whole Row is supposed to help with aligning its children buttons? Especially, given the Item { Layout.fillHeight: true } below, it shouldn't make any difference at all.

Please register or sign in to reply
}
Item {
Layout.fillHeight: true
......
......@@ -156,7 +156,7 @@ PlasmaCore.ColorScope {
RowLayout {
spacing: PlasmaCore.Units.largeSpacing * 2
Layout.alignment: Qt.AlignHCenter
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
  • In this case, the LogoutButton is a subtype of ActionButton with a Layout.alignment: Qt.AlignTop property already set, so the logout screen should have been alright without any patches.

    The bug report 450238 was about lock screen only, which is a SessionManagementScreen component subtyped as MainBlock and finally being used in LockScreenUi.qml. There are a bunch of bare ActionButtons without any Layout.alignment adjustments. But there's something extremely cursed going on instead:

    anchors.verticalCenter: parent.top
Please register or sign in to reply
LogoutButton {
id: suspendButton
iconSource: "system-suspend"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment