-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Centering TextInput #348
Comments
That looks great! It's not currently possible to center the contents of a I imagine an I will try to give it a shot soon, but I believe this could be a good issue for anyone that wants to get familiar with the internals of the library! |
I want to work on it. Never worked properly on any open source before, so not sure how long will it take, but I would love to finish it. Will give it a try this weekend. If I have any doubts will post it here for better reference 👍 |
Fixed by #2535. |
Hi!
I wondered whether it is possible to center (x- and y) the contents of a
TextInput
?I've currently placed the
TextInput
inside of aContainer
with thealign_x
andalign_y
methods, but while this seems to work forText
, with.horizontal_alignment(HorizontalAlignment::Center)
, it fails forTextInput
.I'm trying to build the UI below:
This is where I'm currently at:
The content for each
TextInput
is aligned to the left. Can this be centered in some way? I tried applying.width(Length::Shrink)
, thinking it might size it according to the value/placeholder length, but the element seems to disappear in its entirety in that case.Thank you for creating this library. It's easy to use for a Rust beginner so far.
The text was updated successfully, but these errors were encountered: