fix: correct emoji button bindings

Signed-off-by: Rello <Rello@users.noreply.github.com>
This commit is contained in:
Rello 2025-09-28 12:03:25 +02:00 committed by Matthieu Gallien
parent 1e7f206411
commit fd7a7136e5

View File

@ -53,7 +53,11 @@ ColumnLayout {
Layout.preferredWidth: userStatusMessageTextField.height
Layout.preferredHeight: userStatusMessageTextField.height
text: "😀"
readonly property string fallbackEmoji: "😀"
text: userStatusSelectorModel && userStatusSelectorModel.userStatusEmoji.length > 0
? userStatusSelectorModel.userStatusEmoji
: fallbackEmoji
padding: 0
z: showBorder ? 2 : 0
hoverEnabled: true
@ -69,7 +73,7 @@ ColumnLayout {
contentItem: Label {
text: fieldButton.text
opacity: 0.7
opacity: userStatusSelectorModel && userStatusSelectorModel.userStatusEmoji.length > 0 ? 1.0 : 0.7
textFormat: Text.PlainText
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
@ -78,14 +82,6 @@ ColumnLayout {
onClicked: emojiDialog.open()
}
Binding {
when: userStatusSelectorModel && userStatusSelectorModel.userStatusEmoji.length > 0
fieldButton {
text: userStatusSelectorModel.userStatusEmoji
contentItem.opacity: 1.0
}
}
Popup {
id: emojiDialog
padding: 0