-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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 in auto-resizing window (was: ossible modal bug / auto-resize) #778
Comments
Text wrapping without an explicit wrapping position and TextWrapped() needs a known width to wrap and here you are requesting automatic width. From a end-user perspective what width do you expect the window to have? Would you want the window to fit exactly the width of the OK/Cancel buttons? In that case the text wrapping would depends on the width OK/Cancel buttons, that would work and feel correct but also probably rather odd and mildly desirable. It may just be more desirable to have a default width for the window all-together? The workaround/fix now is to specific a width to your window or disable always-auto-resize on it. |
Aha, well but it also breaks with no AlwaysAutoResize flag but in a different way! Thanks for the quick response! |
You can use It is a rather common issue/pattern I'd like to solve/improve in a better way. It's currently quite confusing for everyone who wants to do the same thing as you. Perhaps TextWrapped() should fallback to use MAX(SOME_DEFAULT_WIDTH, WINDOW_WIDTH). |
Closing this old issue, note that it's not particularly related to popups but simple that TextWrapped() + AlwaysAutoResize flag without an explicit width is contradictory or ambiguous. So this repro just as well:
I've added myself some note about how we could proceed and would like to redesign text wrapping eventually so may come back to it, but right now I've got no other answer than having to push a text wrap pos. And we cannot push a default wrap pos for auto-resizing windows since as implemented, using |
I dont know if I am doing right, but inserting TextWrapped() inside a BeginPopupModal() seems to break it.
Keep up the good work :)
The text was updated successfully, but these errors were encountered: