Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a button view+widget with up to 9 labels #866

Open
wants to merge 30 commits into
base: main
Choose a base branch
from

Conversation

eugenesvk
Copy link
Contributor

Allowing the creation of helpful UI buttons like this, documenting which keys activate it
button9

It supports label padding as well, so you could in principle position labels wherever you like

I've noticed that even empty labels have >0 size (4) and, I guess, makes the button slightly bigger than necessary. Is this an effect of some global layout constant?

  • Is it possible to disable it for all labels but the middle one?

My idea is for this to be identical in its default instance to a regular button.

I've also thought about skipping empty children (though currently it's suprisingy cumbersome to test whether a label is empty, so thought of adding some is method to the label to check whether its string is empty), but then wasn't clear on the proper mechanism for instantiating such children once their text is changed, so thought it might not be an issue if empty labels always exist.

  • Or is it an issue that empty labels are always created/tracked?

Updated docs/tests and added a gallery type example similar to #864

Button9Help

@PoignardAzur
Copy link
Contributor

This feels like the kind of case where we might want a "widget nursery" kind of crate, like druid had. It wouldn't need to be a separate repository, though, I don't think that separation was really useful.

@eugenesvk
Copy link
Contributor Author

What do you think of just making the default widgets overpowered and add all the extra functionality like this to them?

@PoignardAzur
Copy link
Contributor

I'm a bit iffy on that. The complexity quickly adds up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants