[ComboBox] Use transparent dimmer
ClosedPublic

Authored by broulik on Feb 27 2020, 2:26 PM.

Details

Summary

When not using dim it breaks "click outside" for ComboBox when in a ScrollView.
I believe because without an actual Item the Popup filters some events and might have them stolen by the Flickable?
So we keep dim on but use a transparent Item to avoid it actually dimming its surroundings.

Test Plan
  • Kirigami gallery ComboBox still doesn't dim (it does without the Item)
  • ComboBox in QtQuick KCMs like KScreen KCM now close properly on click outside

I'll try reproducing this in a minimal example for Qt bug report

  • Can't reproduce with Flickable or qqc2 ScrollView neither with desktop nor universal style :/

Diff Detail

Repository
R858 Qt Quick Controls 2: Desktop Style
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Feb 27 2020, 2:26 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 27 2020, 2:26 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Feb 27 2020, 2:26 PM
broulik updated this revision to Diff 76546.
broulik edited the test plan for this revision. (Show Details)
  • Clarify comment
broulik edited the test plan for this revision. (Show Details)Feb 27 2020, 3:09 PM

I can't reproduce the issue with the comboboxes on the system tray settings page, which are in a scrollview. Where can I see the original bug?

I can't reproduce the issue with the comboboxes on the system tray settings page, which are in a scrollview. Where can I see the original bug?

e.g. KScreen's resolution ComboBox

Yeah, doesn't seem to be ScrollView's fault. I haven't figured out yet why it is. I suspect something with QQuickWidget used in SystemSettings.

Ah yes, can reproduce with that combobox, when running the KScreen KCM in both System Settings and KCMShell. But not for other comboboxes! :p

Affects any ComboBox in a KCM for me, that isn't in a Popup: Fonts KCM, GTK config on Styles KCM (not the one in the fine tuning popup), the filter in colors KCM, ...

ngraham accepted this revision.Mar 30 2020, 3:39 PM

Yeah, this fixes those issues for me too. Seems to make sense.

This revision is now accepted and ready to land.Mar 30 2020, 3:39 PM
mart accepted this revision.Apr 14 2020, 9:33 AM
This revision was automatically updated to reflect the committed changes.