Skip to content

Commit

Permalink
Align user status and server url in all platforms.
Browse files Browse the repository at this point in the history
Signed-off-by: Camila Ayres <[email protected]>
  • Loading branch information
camilasan committed Mar 4, 2025
1 parent e134c01 commit 129a6ec
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/gui/tray/CurrentAccountHeaderButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ Button {

EnforcedPlainTextLabel {
id: currentAccountServer
Layout.alignment: Qt.AlignLeft | Qt.AlignBottom
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
width: Style.currentAccountLabelWidth
text: UserModel.currentUser ? UserModel.currentUser.server : ""
elide: Text.ElideRight
Expand All @@ -220,13 +220,15 @@ Button {

EnforcedPlainTextLabel {
id: emoji
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
visible: UserModel.currentUser && UserModel.currentUser.statusEmoji !== ""
width: Style.userStatusEmojiSize
text: UserModel.currentUser ? UserModel.currentUser.statusEmoji : ""
topPadding: -Style.accountLabelsSpacing
}
EnforcedPlainTextLabel {
id: message
Layout.alignment: Qt.AlignLeft | Qt.AlignBottom
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
Layout.fillWidth: true
visible: UserModel.currentUser && UserModel.currentUser.statusMessage !== ""
width: Style.currentAccountLabelWidth
Expand All @@ -235,6 +237,8 @@ Button {
: UserModel.currentUser ? UserModel.currentUser.server : ""
elide: Text.ElideRight
font.pixelSize: Style.subLinePixelSize
leftPadding: Style.accountLabelsSpacing
topPadding: -Style.userStatusAnchorsMargin
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/gui/tray/UserLine.qml
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,22 @@ AbstractButton {

EnforcedPlainTextLabel {
id: emoji
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
visible: model.statusEmoji !== ""
text: statusEmoji
topPadding: -Style.accountLabelsSpacing
}

EnforcedPlainTextLabel {
id: message
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
Layout.fillWidth: true
visible: model.statusMessage !== ""
text: statusMessage
elide: Text.ElideRight
font.pixelSize: Style.subLinePixelSize
leftPadding: Style.accountLabelsSpacing
topPadding: -Style.userStatusAnchorsMargin
}
}

Expand All @@ -121,6 +124,7 @@ AbstractButton {
text: server
elide: Text.ElideRight
font.pixelSize: Style.subLinePixelSize
topPadding: -Style.accountLabelsAnchorsMargin
}
}

Expand Down
3 changes: 2 additions & 1 deletion theme/Style/Style.qml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ QtObject {
property int userLineSpacing: smallSpacing
property int accountServerAnchorsMargin: 10
property int accountLabelsSpacing: 4
property int accountLabelsAnchorsMargin: 7
property int accountsServerMargin: 6
property int accountLabelsAnchorsMargin: 5
property int accountLabelsLayoutMargin: 12
property int accountLabelsLayoutTopMargin: 10

Expand Down

0 comments on commit 129a6ec

Please sign in to comment.