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