-
Notifications
You must be signed in to change notification settings - Fork 31
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
Make alignment when free space is negative configurable #241
Make alignment when free space is negative configurable #241
Conversation
Signed-off-by: Nico Burns <[email protected]>
fb70aeb
to
5c855df
Compare
Signed-off-by: Nico Burns <[email protected]>
Signed-off-by: Nico Burns <[email protected]>
c762f49
to
4ec40e5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, but see my note about the boolean option. Perhaps we want one more person to agree this is sensible to have.
A quick test of single words that overflow the width in vello_editor
works as expected.
layout.align( | ||
max_advance, | ||
Alignment::Start, | ||
false, /* align_when_overflowing */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If align
gains more options in the future, a boolean may be a bit confusing, especially if people don't document as you've done here. Maybe an AlignmentOptions
struct could be introduced?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, but don't have time to work on this now. In the interest of getting this landed for Parley 0.3 I'm going to merge this as-is. And have created an issue for the options struct (#247)
Signed-off-by: Nico Burns <[email protected]>
Untested, but probably fixes #240