Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/gui/PredefinedStatusButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ AbstractButton {
leftPadding: Style.standardSpacing / 2
rightPadding: Style.standardSpacing / 2

property real internalSpacing: Style.standardSpacing
property int emojiWidth: -1
property int internalSpacing: Style.standardSpacing
property string emoji: ""

background: Rectangle {
Expand All @@ -37,15 +38,19 @@ AbstractButton {
}

contentItem: Row {
spacing: internalSpacing
spacing: root.internalSpacing

Label {
width: root.emojiWidth > 0 ? root.emojiWidth : implicitWidth
text: emoji
horizontalAlignment: Image.AlignHCenter
verticalAlignment: Image.AlignVCenter
}

Label {
text: root.text
color: Style.ncTextColor
verticalAlignment: Text.AlignVCenter
}
}
}
7 changes: 5 additions & 2 deletions src/gui/UserStatusSelector.qml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ ColumnLayout {
}

RowLayout {
id: statusFieldLayout
Layout.fillWidth: true
spacing: 0

Expand Down Expand Up @@ -264,9 +265,11 @@ ColumnLayout {
model: userStatusSelectorModel.predefinedStatuses

PredefinedStatusButton {
id: control
Layout.fillWidth: true
internalSpacing: Style.standardSpacing + fieldButton.padding + userStatusMessageTextField.padding

leftPadding: 0
emojiWidth: fieldButton.width
internalSpacing: statusFieldLayout.spacing + userStatusMessageTextField.leftPadding

emoji: modelData.icon
text: "<b>%1</b> – %2".arg(modelData.message).arg(userStatusSelectorModel.clearAtReadable(modelData))
Expand Down