-
Notifications
You must be signed in to change notification settings - Fork 125
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
Update to current parley
main
#870
Update to current parley
main
#870
Conversation
@@ -386,7 +386,7 @@ impl Widget for Label { | |||
}; | |||
if self.alignment_changed { | |||
self.text_layout | |||
.align(Some(alignment_width), self.alignment); | |||
.align(Some(alignment_width), self.alignment, false); |
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.
Obviously I'm not super happy about an ugly boolean parameter appearing here. For reference, it seems to be from linebender/parley#241, meaning whether we align when overflowing.
The lack of tests in that PR to make it more comprehensible isn't ideal...
In this case:
- I agree that
false
maintains the same behaviour here. I think that true would maybe be a better default, but that should be a follow-up - I think that Replace boolean option in
Layout::align
withAlignmentOptions
Struct parley#247 should block parley 0.3 (cc @tomcur); the fact that every use in Make alignment when free space is negative configurable parley#241 needed to be documented with the parameter name as a comment strongly supports this...
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.
I think that linebender/parley#247 should block parley 0.3
Yes, that issue is blocking 0.3. Nico opened a PR fixing it yesterday: linebender/parley#278.
I agree that false maintains the same behaviour here. I think that true would maybe be a better default, but that should be a follow-up
I believe false
(start-alignment for lines that overflow) is what web does, and currently that's the planned default for the AlignmentOptions
introduced in Nico's PR.
This updates to the version using the updated objc2 and binding crates for Fontique. It also has a minor API change.
09c9ddf
to
375c4f1
Compare
@waywardmonkeys It looks to me like the old version is including trailing whitespace in the width of the line for the purposes of alignment, and the new version is ignoring. If so, then I believe the new version is correct. Eyeballing it, the text looks more centered in the new screenshot. |
This updates to the version using the updated objc2 and binding crates for Fontique.
It also has a minor API change.