linebender / druid

A data-first Rust-native UI design toolkit.
https://linebender.org/druid/
Apache License 2.0
9.45k stars 569 forks source link

What is a modal? #2308

Open CryZe opened 1 year ago

CryZe commented 1 year ago

It seems like recent changes turned modals into essentially tooltips on at least Windows. I don't believe this was intended (unfocusable, no window borders), but maybe it's just not clear what a modal even is supposed to be.

jneem commented 1 year ago

By "modal" do you mean windows created with WindowLevel::Modal? If so, bear in mind that WindowLevel is only about the z-order, and doesn't (or at least, shouldn't according to the docs) affect borders or focus or anything else.

There was some discussion on #2042 about the cross-platform API and how it should map onto windows, but it's quite possible that we got something wrong.

CryZe commented 1 year ago

Well it totally does on Windows. The code on master currently treats it 100% like a tooltip and makes it unfocusable, unclickable, unmovable and removes all decorations.

xStrom commented 1 year ago

I was looking into some of this code recently and couldn't find any implementation beyond tooltips. So I was left with the impression that it isn't implemented, or at least isn't tested.

Maybe I missed something though. Do we have an example in Druid that shows modals in action?