Skip to content

Add JustifyRight, JustifyCentre and JustifyAll#4024

Open
Annonnymmousss wants to merge 3 commits intoGraphiteEditor:masterfrom
Annonnymmousss:feat/justify_proper_align
Open

Add JustifyRight, JustifyCentre and JustifyAll#4024
Annonnymmousss wants to merge 3 commits intoGraphiteEditor:masterfrom
Annonnymmousss:feat/justify_proper_align

Conversation

@Annonnymmousss
Copy link
Copy Markdown
Contributor

Partially closes #2351

Screen.Recording.2026-04-12.at.6.03.41.AM.mov

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Contributor Author

@cubic-dev

@cubic-dev-ai
Copy link
Copy Markdown
Contributor

cubic-dev-ai bot commented Apr 12, 2026

@cubic-dev

@Annonnymmousss I have started the AI code review. It will take a few minutes to complete.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

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.

Text alignment, justification, and hyphenation

1 participant