Skip to content

Commit

Permalink
Align predefined status text with the text in the text box
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
  • Loading branch information
claucambra authored and mgallien committed Jun 24, 2022
1 parent 5f0d49a commit 3501640
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
17 changes: 14 additions & 3 deletions src/gui/PredefinedStatusButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,24 @@ AbstractButton {
leftPadding: Style.standardSpacing / 2
rightPadding: Style.standardSpacing / 2

property real internalSpacing: Style.standardSpacing
property string emoji: ""

background: Rectangle {
color: root.hovered || root.checked ? Style.lightHover : "transparent"
radius: Style.slightlyRoundedButtonRadius
}

contentItem: Label {
text: root.text
color: Style.ncTextColor
contentItem: Row {
spacing: internalSpacing

Label {
text: emoji
}

Label {
text: root.text
color: Style.ncTextColor
}
}
}
4 changes: 3 additions & 1 deletion src/gui/UserStatusSelector.qml
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,10 @@ ColumnLayout {
Layout.fillWidth: true
Layout.leftMargin: Style.standardSpacing
Layout.rightMargin: Style.standardSpacing
internalSpacing: Style.standardSpacing + fieldButton.padding + userStatusMessageTextField.padding

text: userStatusSelectorModel.predefinedStatus(index).icon + " <b>" + userStatusSelectorModel.predefinedStatus(index).message + "</b> - " + userStatusSelectorModel.predefinedStatusClearAt(index)
emoji: userStatusSelectorModel.predefinedStatus(index).icon
text: "<b>" + userStatusSelectorModel.predefinedStatus(index).message + "</b> - " + userStatusSelectorModel.predefinedStatusClearAt(index)
onClicked: userStatusSelectorModel.setPredefinedStatus(index)
}
}
Expand Down

0 comments on commit 3501640

Please sign in to comment.