-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Text wrapping too late #2578
Labels
bug
Something is broken
Comments
A simple reproduce would help a lot, preferably just a call to |
Ok I did some digging and this reproduces it main.rs:
|
bu5hm4nn
pushed a commit
to bu5hm4nn/egui
that referenced
this issue
Mar 8, 2023
- `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
bu5hm4nn
pushed a commit
to bu5hm4nn/egui
that referenced
this issue
Mar 8, 2023
- `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
Should be fixed in #2791. Read description of PR for explanation why that line shouldn't be there. |
bu5hm4nn
pushed a commit
to bu5hm4nn/egui
that referenced
this issue
Mar 8, 2023
- `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
mikedilger
added a commit
to mikedilger/egui
that referenced
this issue
Mar 8, 2023
bu5hm4nn
pushed a commit
to bu5hm4nn/egui
that referenced
this issue
Mar 9, 2023
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
pushed a commit
to bu5hm4nn/egui
that referenced
this issue
Mar 9, 2023
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
mikedilger
added a commit
to mikedilger/egui
that referenced
this issue
Mar 9, 2023
Fix issue emilk#2578 (again)
mikedilger
pushed a commit
to mikedilger/egui
that referenced
this issue
Mar 29, 2023
- `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
mikedilger
pushed a commit
to mikedilger/egui
that referenced
this issue
Mar 31, 2023
- `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
mikedilger
pushed a commit
to mikedilger/egui
that referenced
this issue
Apr 13, 2023
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
mikedilger
pushed a commit
to mikedilger/egui
that referenced
this issue
Sep 29, 2023
- `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
mikedilger
pushed a commit
to mikedilger/egui
that referenced
this issue
Sep 29, 2023
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
jeremyd
pushed a commit
to jeremyd/egui
that referenced
this issue
Feb 9, 2024
- `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
jeremyd
pushed a commit
to jeremyd/egui
that referenced
this issue
Feb 9, 2024
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
jeremyd
pushed a commit
to jeremyd/egui
that referenced
this issue
Feb 9, 2024
- `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
jeremyd
pushed a commit
to jeremyd/egui
that referenced
this issue
Feb 9, 2024
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
pushed a commit
to bu5hm4nn/egui
that referenced
this issue
Feb 9, 2024
- `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
bu5hm4nn
pushed a commit
to bu5hm4nn/egui
that referenced
this issue
Feb 9, 2024
…k 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 commi
bu5hm4nn
added a commit
to bu5hm4nn/egui
that referenced
this issue
Mar 8, 2024
… 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
added a commit
to bu5hm4nn/egui
that referenced
this issue
Mar 11, 2024
… 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
added a commit
to bu5hm4nn/egui
that referenced
this issue
Jul 23, 2024
- `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
bu5hm4nn
added a commit
to bu5hm4nn/egui
that referenced
this issue
Aug 6, 2024
… 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
bu5hm4nn
added a commit
to bu5hm4nn/egui
that referenced
this issue
Aug 8, 2024
… 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Under certain conditions, text wrapping leaves one line of text too wide compared to the container, in my case pushing the container width (or it's ancestors) beyond the bounds of the window.
Tested on master, 60b4f5e
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Wrapping that doesn't expand the width of the container.
Screenshots
https://user-images.githubusercontent.com/1653275/212086814-c878a200-f7ab-4a84-a5f0-a0b89ec740a5.png
Normally subsequent posts (below the horizontal lines) line up on the left edge. Here, they are pushed left beyond the edge of the window.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: