pop-os / libcosmic

WIP library for COSMIC applications
https://pop-os.github.io/libcosmic/cosmic/
Mozilla Public License 2.0
429 stars 41 forks source link

[bug] Dropdown widget (PickList also) does not open in Dialog widget. #428

Open elevenhsoft opened 4 months ago

elevenhsoft commented 4 months ago

Hey,

After moving to dialogs in my app I realized dropdown as well as picklist widgets does not open anymore. I'm not sure what's the issue yet. I thought that's something with my app but no. I just forked libcosmic and add simple example to show the problem, you can find it here: https://github.com/elevenhsoft/libcosmic/tree/dropdown-fix

There is 2 dropdowns. One for main window and one inside dialog. The second one does not react for anything.

mmstick commented 4 months ago

In-app dialogs use the Widget::overlay method, while dropdown and picklist also use overlays, so there is likely a drawing issue similar to #382

elevenhsoft commented 4 months ago

Well, that's bad. Can we deal with this somehow? Or I should do some workarounds?

mmstick commented 4 months ago

Besides fixing the issue in libcosmic and/or iced, you could use pages instead of dialogs for now.

elevenhsoft commented 4 months ago

Oh, that's good idea. I was thinking about moving some controls to main window. But pages could be better. Yeah. Thank you.

mmstick commented 4 months ago

You can compare what cosmic-settings currently does. You can use either a link button at the top of the page, or an icon button, to go back to the main page.

elevenhsoft commented 4 months ago

Yep. I've got simple idea ^^