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

Style feature to have label truncate by default #4473

Open
abey79 opened this issue May 7, 2024 · 2 comments
Open

Style feature to have label truncate by default #4473

abey79 opened this issue May 7, 2024 · 2 comments
Labels
egui rerun Desired for Rerun.io

Comments

@abey79
Copy link
Collaborator

abey79 commented May 7, 2024

In some context, it would be useful to have ui.label(txt) defaults to truncate, such as we don't have to change them all for ui.add(egui::Label::new(txt).truncate(true)). Likewise, it would be nice to have a ui.label_truncated() helper (though each might be suited for different situations).

As per:

@emilk
Copy link
Owner

emilk commented May 24, 2024

Would ui.style().truncate = Some(true); solve most of the problems @abey79, or do you still want label_trunc and label_wrap?

@abey79
Copy link
Collaborator Author

abey79 commented May 24, 2024

I think ui.style().truncate = Some(true); would actually solve this more elegantly than dedicated ui.label_trunc. It's also more in-line with the bigger CSS-like styling story.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
egui rerun Desired for Rerun.io
Projects
None yet
Development

No branches or pull requests

2 participants