Skip to content

Conversation

@mfreeborn
Copy link
Contributor

@hecrj
Copy link
Member

hecrj commented Nov 30, 2025

What is the use case? This is a rather internal function.

@hecrj hecrj closed this Nov 30, 2025
@hecrj hecrj added this to the 0.14 milestone Nov 30, 2025
@hecrj hecrj added improvement An internal improvement change labels Nov 30, 2025
@mfreeborn
Copy link
Contributor Author

The exact line of code is:

let text_content = column![current_version_text, next_version_text]
    .spacing(text::LineHeight::default().to_absolute(DEFAULT_FONT_SIZE.into()) / 2.0);

in which I'm setting the spacing of two pieces of text in a column relative to their font size.

i.e. calculating a visually appealing line spacing for these two lines:

image

@hecrj
Copy link
Member

hecrj commented Nov 30, 2025

Any reason you are not using text!("...\n...")?

@mfreeborn
Copy link
Contributor Author

Err, yea I could do that..!

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

Labels

change improvement An internal improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants