linebender / druid

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

Make it possible to build "standard" dialogs #2368

Open sclu1034 opened 1 year ago

sclu1034 commented 1 year ago

By "standard", I mean something akin to Gdk.MessageDialog or Gtk.Dialog.

Currently, the two options I see are:

Given how common dialogs are, it might be suitable to create a WindowLevel::Dialog(parent) that sets things up akin to Gtk.Dialog. But ideally, WindowDesc would be given more customizability instead. Especially because you can write something like this right now and wonder why there is no titlebar:

WindowDesc::new(widget)
  // I demand a titlebar
  .set_titlebar(true)
  // But the modal will silently ignore it
  .window_level(WindowLevel::Modal(parent))

So my wishlist to extend a WindowLevel::Modal window description would be:

xStrom commented 1 year ago

Generally I think this should indeed be possible and a lot of what you described seems reasonable.

There is the meta issue of Druid being discontinued, so depending on how large the code changes are it might be a very slow review process. One thing I've been thinking about is doing a final push to switch Druid to use Glazier. No promises or ETAs, but in theory this would allow for at least part of the work to be done in the context of Glazier, which would have a lot faster review times.