Add builder method for TextFont::line_height
(#17203)
# Objective Followup from #16614 `TextFont` has builder methods for its other fields. Add `with_line_height` for consistency. ## Solution Add it
This commit is contained in:
parent
fbc55b84e2
commit
f896ad8457
@ -323,6 +323,12 @@ impl TextFont {
|
|||||||
self.font_smoothing = font_smoothing;
|
self.font_smoothing = font_smoothing;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns this [`TextFont`] with the specified [`LineHeight`].
|
||||||
|
pub const fn with_line_height(mut self, line_height: LineHeight) -> Self {
|
||||||
|
self.line_height = line_height;
|
||||||
|
self
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for TextFont {
|
impl Default for TextFont {
|
||||||
|
Loading…
Reference in New Issue
Block a user