Skip to content

Commit

Permalink
fix size of the Label with user status
Browse files Browse the repository at this point in the history
ensure the label width is not higher than the parent to ensure log
string get elided as expected

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
  • Loading branch information
mgallien committed Jul 16, 2021
1 parent b72d1af commit c260213
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/gui/tray/Window.qml
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,9 @@ Window {
spacing: 0
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
Layout.leftMargin: Style.userStatusSpacing
Layout.fillWidth: true
Layout.maximumWidth: parent.width

Label {
id: currentAccountUser
Layout.alignment: Qt.AlignLeft | Qt.AlignBottom
Expand All @@ -372,11 +375,14 @@ Window {
font.pixelSize: Style.topLinePixelSize
font.bold: true
}

RowLayout {
id: currentUserStatus
visible: UserModel.currentUser.isConnected &&
UserModel.currentUser.serverHasUserStatus
spacing: Style.accountLabelsSpacing
width: parent.width

Label {
id: emoji
visible: UserModel.currentUser.statusEmoji !== ""
Expand All @@ -386,6 +392,7 @@ Window {
Label {
id: message
Layout.alignment: Qt.AlignLeft | Qt.AlignBottom
Layout.fillWidth: true
visible: UserModel.currentUser.statusMessage !== ""
width: Style.currentAccountLabelWidth
text: UserModel.currentUser.statusMessage !== ""
Expand Down

0 comments on commit c260213

Please sign in to comment.