Skip to content

Add text_line_spacing to control vertical spacing between text lines#8040

Open
rustbasic wants to merge 6 commits intoemilk:mainfrom
rustbasic:patch178
Open

Add text_line_spacing to control vertical spacing between text lines#8040
rustbasic wants to merge 6 commits intoemilk:mainfrom
rustbasic:patch178

Conversation

@rustbasic
Copy link
Copy Markdown
Contributor

Add text_line_spacing to control vertical spacing between text lines

Description
This PR adds a new Spacing::text_line_spacing field to control additional vertical spacing between lines of text.

The spacing is applied to text layout by adjusting TextFormat::line_height based on the font row height plus the configured extra spacing.

This improves text readability and allows consistent line spacing customization for widgets such as TextEdit and Label.

Added a new field for additional vertical spacing between lines of text in the style configuration.
Round the line height calculation for better precision.
Removed rounding from text line spacing calculation.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 27, 2026

Preview available at https://egui-pr-preview.github.io/pr/8040-patch178
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

View snapshot changes at kitdiff

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.

1 participant