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

Checkbox without label #1047

Closed
voelklmichael opened this issue Jan 6, 2022 · 1 comment · Fixed by #1456
Closed

Checkbox without label #1047

voelklmichael opened this issue Jan 6, 2022 · 1 comment · Fixed by #1456
Labels
feature New feature or request

Comments

@voelklmichael
Copy link
Contributor

I would like to have a checkbox without label, since a label like "" also reserves a lot of (empty) space.
This reservation looks bad in my Layout.

Possible solutions:

  • change checkbox constructor to use Option
  • add new constructors
  • add new widget

Is this a good "first contributor" issue? If so, I can try to implement this.

@voelklmichael voelklmichael added the feature New feature or request label Jan 6, 2022
@emilk
Copy link
Owner

emilk commented Jan 8, 2022

I think the simplest approach is just to treat the text.is_empty() case differently in Checkbox::ui, so that ui.checkbox(&mut value, "") takes up minimal space.

Feel free to implement this!

Make sure you also do it for RadioButon (the code for Checkbox and RadioButton are extremely similar)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
2 participants