Skip to content

Commit

Permalink
fix: StatusComboBox doesn't react on click outside indicator
Browse files Browse the repository at this point in the history
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
  • Loading branch information
caybro committed Mar 29, 2023
1 parent 7d3b0a5 commit 40e4a36
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down

0 comments on commit 40e4a36

Please sign in to comment.