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

Long term solution to no text-wrapping in iced for mod entries #46

Closed
atlanticaccent opened this issue Jun 12, 2021 · 1 comment
Closed
Labels
hard This issue will likely need intimate knowledge of the project or its dependencies

Comments

@atlanticaccent
Copy link
Owner

I really don't know how to do this nicely.

At the moment, iced doesn't provide configurable text shaping (I think that's the term?). Iced does automatically split text when it there's no more space on the current line, but it's not configurable beyond that.

Ideal solutions would be to:

  • insert ellipses to indicate that a string has not fit into the space available
  • Shrink and grow (to a maximum) rows to account for longer strings. This would be quite hard, but I can think of maybe a way to do it
    • Somehow get the width of the cell
    • somehow get the width of the string to go into the cell
    • check if string_width > cell_width
    • add space for a new line
    • repeat to max
    • Points one and two are the hardest, as they involve rendering without rendering (maybe?) and potentially private methods.
@atlanticaccent atlanticaccent added the hard This issue will likely need intimate knowledge of the project or its dependencies label Jun 12, 2021
@atlanticaccent
Copy link
Owner Author

Not as relevant/iced specific now that we're on druid with 0.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hard This issue will likely need intimate knowledge of the project or its dependencies
Projects
None yet
Development

No branches or pull requests

1 participant