Skip to content

Use ink_rect's width and set alignment before getting dimensions#375

Open
mohad12211 wants to merge 1 commit intotrigg:masterfrom
mohad12211:fix-right-alignment
Open

Use ink_rect's width and set alignment before getting dimensions#375
mohad12211 wants to merge 1 commit intotrigg:masterfrom
mohad12211:fix-right-alignment

Conversation

@mohad12211
Copy link

  1. Set the layout alignment before getting the box dimensions (ink_rect, logical_rect) = layout.get_pixel_extents()

  2. use ink_rect.width instead of logical_rect.width

    • If you use the logical rect, for some special RTL cases, the text would be over the avatar or very close to it.
    • I noticed that the commit that made the Right Align Text No Longer shown in 0.7.9 #368 regression (369ba96) was trying to solve some RTL issue, so I also tried to tackle this as well, there might be more RTL issues, but it should be better now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Right Align Text No Longer shown in 0.7.9

1 participant