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

Feature Request: widget.NewSelect with TextAlignment for options #2329

Closed
michael-nischt opened this issue Jul 18, 2021 · 5 comments
Closed
Labels
enhancement New feature or request

Comments

@michael-nischt
Copy link

michael-nischt commented Jul 18, 2021

Is your feature request related to a problem? Please describe:

There's no way to set the text alignment for options for a widget.Select similar to a label. It seems to me centering the options would be a common use case.

Is it possible to construct a solution with the existing API?

I'm not sure. I might be but if only with considerable effort? (for something which should trivial)

Describe the solution you'd like to see:

widget.Select with a Alignment fyne.TextAlign field similar to widget.Label.

(feature request as recommended on twitter)

@michael-nischt michael-nischt changed the title widget.NewSelect with TextAlignment for options Feature Request: widget.NewSelect with TextAlignment for options Jul 18, 2021
@Jacalz Jacalz added the enhancement New feature or request label Jul 19, 2021
@andydotxyz
Copy link
Member

I guess this could be added. We agreed that Label should have this but Entry should not.
As a result the SelectEntry should not support it either (which is OK as it extends Entry). So should Select? I suppose there is not a strong reason not to.

@michael-nischt
Copy link
Author

Thx for details. I can totally see a load of problems / edge cases with text input (Entry + SelectEntry).
If you don't expected / notice any problems for Select, I would appreciate the addition. 🙂

andydotxyz added a commit to andydotxyz/fyne that referenced this issue Jul 22, 2021
Need to pass it all the way down to menu item. Do so internally for now,
as we don't need to expose alignment of menu items publicly.

Fixes fyne-io#2329
@andydotxyz
Copy link
Member

There is a proposed implementation in the PR linked above @michael-nischt

@andydotxyz andydotxyz added this to the Aberlour (2.1) milestone Jul 22, 2021
@michael-nischt
Copy link
Author

awesome @andydotxyz ! looks great to me but ofc I lack a lot of detail knowledge. ☺️

@andydotxyz
Copy link
Member

This is now landed on develop branch if you'd like to use it before 2.1 release

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

No branches or pull requests

3 participants