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

feat(combobox): implement text wrap for selected text #2272

Merged
merged 5 commits into from Nov 16, 2022

Conversation

RobWalt
Copy link
Contributor

@RobWalt RobWalt commented Nov 9, 2022

  • Keep your PR:s small and focused.
  • If applicable, add a screenshot or gif.
  • Unless this is a trivial change, add a line to the relevant CHANGELOG.md under "Unreleased".
  • If it is a non-trivial addition, consider adding a demo for it to egui_demo_lib.
  • Remember to run cargo fmt and cargo clippy.
  • Open the PR as a draft until you have self-reviewed it and run ./sh/check.sh.
  • When you have addressed a PR comment, mark it as resolved.

Closes #2271.

@RobWalt RobWalt marked this pull request as draft November 9, 2022 14:06
@RobWalt RobWalt marked this pull request as ready for review November 9, 2022 15:48
@RobWalt
Copy link
Contributor Author

RobWalt commented Nov 10, 2022

Here is an example of why this feature would be important

egui

The text can't be displayed in the screen entriely.

- specifying a wrap width didn't really make sense so now it's boolean
- the selected text will now use the maximum available width while still
  respecting the spacing and icon coming after it
@RobWalt
Copy link
Contributor Author

RobWalt commented Nov 10, 2022

egui

I reiterated on the feature and now wrap is a method accepting a boolean argument. If it is turned on the selected text will take the maximum available space while still respecting the spacing and icon that come after it.

Also note that this doesn't break or change old code, since it deafults to the old behavior.

Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

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

Thanks!

@emilk
Copy link
Owner

emilk commented Nov 13, 2022

This needs to merge in the main branch before we can merge the PR

@emilk emilk merged commit 0ff1ee3 into emilk:master Nov 16, 2022
@RobWalt RobWalt deleted the feat/combobox-text-wrap branch November 16, 2022 11:12
emilk pushed a commit that referenced this pull request Dec 2, 2022
* feat(combobox): implement text wrap for selected text

* chore(changelog): add line to changelog

* feat(combobox-text-wrap): make wrap boolean

- specifying a wrap width didn't really make sense so now it's boolean
- the selected text will now use the maximum available width while still
  respecting the spacing and icon coming after it

* feat(combobox-text-wrap): update changelog
JohannesProgrammiert pushed a commit to JohannesProgrammiert/egui that referenced this pull request Jan 21, 2023
* feat(combobox): implement text wrap for selected text

* chore(changelog): add line to changelog

* feat(combobox-text-wrap): make wrap boolean

- specifying a wrap width didn't really make sense so now it's boolean
- the selected text will now use the maximum available width while still
  respecting the spacing and icon coming after it

* feat(combobox-text-wrap): update changelog
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.

Text wrap for ComboBoxs selected text
2 participants