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

Implement align_x for TextInput #2535

Merged
merged 1 commit into from
Aug 24, 2024

Conversation

bungoboingo
Copy link
Contributor

  • Added ability to right-align text_input
  • Added small example for text_inputs

@bungoboingo bungoboingo force-pushed the text-input-alignment branch from f935207 to a6ce88e Compare July 30, 2024 23:13
@hecrj hecrj added this to the 0.13 milestone Aug 24, 2024
Co-authored-by: Shan <shankern@protonmail.com>
@hecrj hecrj force-pushed the text-input-alignment branch from a6ce88e to 6c74192 Compare August 24, 2024 00:37
@hecrj hecrj changed the title Right-aligned text inputs Implement align_x for TextInput Aug 24, 2024
Copy link
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I simplified the logic a bit by assuming the text is always left-aligned and only translating the click and render targets.

We also support alignment::Horizontal now, which means Center is an option as well! The todos example showcases it.

image

@hecrj hecrj enabled auto-merge August 24, 2024 00:43
@hecrj hecrj merged commit 043f030 into iced-rs:master Aug 24, 2024
12 checks passed
@hecrj hecrj mentioned this pull request Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants