Slightly improve the layout of the login/logout/lock screens

Currently on the login/logout/lock screens, there is almost no spacing between
the avatar and username, which makes the user' delegate looks too tight.This MR 
fixes this issue.
wilder-5.25
Eugene Popov 4 years ago committed by Nate Graham
parent ed6e8656c5
commit e58d3865df
  1. 5
      lookandfeel/contents/components/UserDelegate.qml
  2. 2
      lookandfeel/contents/components/UserList.qml
  3. 4
      lookandfeel/contents/logout/Logout.qml

@ -33,8 +33,6 @@ Item {
property real faceSize: PlasmaCore.Units.gridUnit * 7
implicitHeight: imageSource.height + usernameDelegate.height
implicitWidth: Math.max(imageSource.width, usernameDelegate.width)
opacity: isCurrent ? 1.0 : 0.5
Behavior on opacity {
@ -150,12 +148,13 @@ Item {
id: usernameDelegate
anchors.top: imageSource.bottom
anchors.topMargin: PlasmaCore.Units.gridUnit
anchors.horizontalCenter: parent.horizontalCenter
// Make it bigger than other fonts to match the scale of the avatar better
font.pointSize: wrapper.fontSize + 4
width: constrainText ? imageSource.width : implicitWidth
width: constrainText ? parent.width : implicitWidth
text: wrapper.name
style: softwareRendering ? Text.Outline : Text.Normal
styleColor: softwareRendering ? PlasmaCore.ColorScope.backgroundColor : "transparent" //no outline, doesn't matter

@ -12,7 +12,7 @@ ListView {
id: view
readonly property string selectedUser: currentItem ? currentItem.userName : ""
readonly property int userItemWidth: PlasmaCore.Units.gridUnit * 8
readonly property int userItemHeight: PlasmaCore.Units.gridUnit * 8
readonly property int userItemHeight: PlasmaCore.Units.gridUnit * 9
readonly property bool constrainText: count > 1
property int fontSize: PlasmaCore.Theme.defaultFont.pointSize + 2

@ -40,7 +40,7 @@ PlasmaCore.ColorScope {
function hibernateRequested() {
root.suspendRequested(4);
}
property real timeout: 30
property real remainingTime: root.timeout
property var currentAction: {
@ -104,6 +104,8 @@ PlasmaCore.ColorScope {
onClicked: root.cancelRequested()
}
UserDelegate {
width: PlasmaCore.Units.gridUnit * 8
height: PlasmaCore.Units.gridUnit * 9
anchors {
horizontalCenter: parent.horizontalCenter
bottom: parent.verticalCenter

Loading…
Cancel
Save