fix: StatusComboBox doesn't react on click outside indicator

Redirect the click event and let the CustomComboItem fill the whole
`contentItem` (otherwise a Button over another Button eats all the mouse
events)

Fixes: #9977
This commit is contained in:
Lukáš Tinkl 2023-03-29 01:39:41 +02:00 committed by Lukáš Tinkl
parent 7d3b0a576b
commit 40e4a3670f
1 changed files with 4 additions and 5 deletions

View File

@ -38,13 +38,13 @@ StatusComboBox {
id: root id: root
/*! /*!
\qmlproperty string StatusEmojiAndColorComboBox::v \qmlproperty string StatusEmojiAndColorComboBox::defaultAssetName
This property holds the default asset shown if no emoji provided. This property holds the default asset shown if no emoji provided.
*/ */
property string defaultAssetName: "info" property string defaultAssetName: "info"
/*! /*!
\qmlproperty string StatusEmojiAndColorComboBox::v \qmlproperty int StatusEmojiAndColorComboBox::delegateHeight
This property holds the delegate height value. This property holds the delegate height value.
*/ */
property int delegateHeight: 44 property int delegateHeight: 44
@ -59,12 +59,11 @@ StatusComboBox {
control.textRole: "name" control.textRole: "name"
contentItem: CustomComboItem { contentItem: CustomComboItem {
anchors.top: parent.top anchors.fill: parent
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
text: root.control.displayText text: root.control.displayText
emoji: d.emoji emoji: d.emoji
color: d.color color: d.color
onClicked: control.popup.opened ? control.popup.close() : control.popup.open()
} }
delegate: CustomComboItem { delegate: CustomComboItem {