From: Claudio Cambra Date: Fri, 25 Nov 2022 12:06:16 +0000 (+0100) Subject: Decouple emoji field button from UserStatusSelectorButton X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~58^2^2~28^2~24 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7dc8a7ab0c646b5a46505adb38311b030f20811e;p=nextcloud-desktop.git Decouple emoji field button from UserStatusSelectorButton Signed-off-by: Claudio Cambra --- diff --git a/src/gui/UserStatusSelector.qml b/src/gui/UserStatusSelector.qml index cdac7e9d7..e20f58890 100644 --- a/src/gui/UserStatusSelector.qml +++ b/src/gui/UserStatusSelector.qml @@ -130,20 +130,18 @@ ColumnLayout { Layout.fillWidth: true spacing: 0 - UserStatusSelectorButton { + AbstractButton { id: fieldButton + readonly property bool showBorder: hovered || checked || emojiDialog.visible + Layout.preferredWidth: userStatusMessageTextField.height Layout.preferredHeight: userStatusMessageTextField.height text: userStatusSelectorModel.userStatusEmoji - - onClicked: emojiDialog.open() - onHeightChanged: topButtonsLayout.maxButtonHeight = Math.max(topButtonsLayout.maxButtonHeight, height) - - primary: true padding: 0 - z: hovered ? 2 : 0 // Make sure highlight is seen on top of text field + z: showBorder ? 2 : 0 // Make sure highlight is seen on top of text field + hoverEnabled: true property color borderColor: showBorder ? Style.ncBlue : palette.dark @@ -175,6 +173,15 @@ ColumnLayout { color: palette.button } } + + contentItem: Label { + text: fieldButton.text + textFormat: Text.PlainText + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + } + + onClicked: emojiDialog.open() } Popup {