ubuntu / yaru.dart

Ubuntu Yaru Flutter widgets and themes for building desktop and web applications
https://ubuntu.github.io/yaru.dart/
Mozilla Public License 2.0
185 stars 33 forks source link

Proposal: add YaruComboBox #664

Open jpnurmi opened 1 year ago

jpnurmi commented 1 year ago

The old route-based (Yaru)PopupMenuButton and DropdownButton, and the new overlay-based DropdownMenu all have some problems that make them suboptimal. The former have hardcoded 300ms transitions that make them feel out of place on desktop, limited theming that makes it impossible to customize mouse cursors, and the latter is not possible to make non-editable with the current stable version of Flutter.

We could try building our own MenuAnchor-based solution and perhaps call it YaruComboBox inspired by Qt and GTK.

whiskeyPeak commented 1 year ago

There's also no way to get rid of the trailing icon for the DropdownMenu widget. Even if you feed it an empty SizedBox, there is still going to be an inkwell like area that response to mouse clicks. I've experimented a bit with the MenuAnchor widget and it's incredibly customizable.

whiskeyPeak commented 1 year ago

@jpnurmi This PR should make things a little easier :) https://github.com/flutter/flutter/pull/123723

madsrh commented 1 year ago

With the current (Yaru)PopupMenuButton there's also no way to add a floatingLabelBehavior. This would also be nice to have in a combobox 😊