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

Fix text wrapping too late #2791

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Mar 11, 2024

  1. Fix issue emilk#2578 - row_start_x tracks a virtual position in the…

    … source paragraph (the one that is too long) for which length has already been processed. When creating an empty row, this position should not be updated as no glyphs were consumed from the source paragraph. - added example that would demonstrate the problem if the line was included, and that is fixed with this commit
    
    Fix issue emilk#2578 There was confusion in the code over how to
    break when on a non-empty visual row (`first_row_indentation > 0.0`), causing
    text to be shifted left outside the ui frame. This is the case for example
    when another label has already been placed in this `ui.horizontal_wrapped()`.
    This fix will not create an empty row, essentially starting a newline, but
    rather try to fit as much text as possible on the existing row. IMO this is
    the desired use of a wrapping layout. I've also added an example that would
    demonstrate the problem if the line was included, and that is fixed with this
    commit
    bu5hm4nn committed Mar 11, 2024
    Configuration menu
    Copy the full SHA
    ca21c5b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a286a2d View commit details
    Browse the repository at this point in the history