Add JustifyRight, JustifyCentre and JustifyAll#4024
Add JustifyRight, JustifyCentre and JustifyAll#4024Annonnymmousss wants to merge 3 commits intoGraphiteEditor:masterfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces comprehensive text alignment support, adding Justify Center, Justify Right, and Justify All variants to the existing alignment options. The core logic for text rendering was updated to handle these new modes by calculating specific offsets and inter-character spacing for the final lines of paragraphs. Additionally, the PR ensures that alignment changes are correctly reflected in the UI, the node graph, and the active text editing session. A code improvement was suggested to streamline the conditional logic used for alignment calculations.
There was a problem hiding this comment.
Code Review
This pull request implements expanded text alignment options, including 'Justify Center', 'Justify Right', and 'Justify All'. The changes span the UI property editors, the text tool message handling, and the core text rendering logic. Specifically, the rendering engine now supports calculating horizontal offsets and distributing extra space between words for the last line of a paragraph. A review comment identifies a logic issue in the justification calculation where trailing whitespace is included in the space count, which could prevent text from correctly aligning with the right margin.
|
@Annonnymmousss I have started the AI code review. It will take a few minutes to complete. |
Partially closes #2351
Screen.Recording.2026-04-12.at.6.03.41.AM.mov