Skip to content

Commit

Permalink
Merge pull request #2358 from bungoboingo/text-editor-font-size
Browse files Browse the repository at this point in the history
Some text_editor QoL
  • Loading branch information
hecrj authored Apr 2, 2024
2 parents 99a9041 + 385a449 commit b17f890
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions widget/src/text_editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,21 @@ where
self
}

/// Sets the text size of the [`TextEditor`].
pub fn size(mut self, size: impl Into<Pixels>) -> Self {
self.text_size = Some(size.into());
self
}

/// Sets the [`text::LineHeight`] of the [`TextEditor`].
pub fn line_height(
mut self,
line_height: impl Into<text::LineHeight>,
) -> Self {
self.line_height = line_height.into();
self
}

/// Sets the [`Padding`] of the [`TextEditor`].
pub fn padding(mut self, padding: impl Into<Padding>) -> Self {
self.padding = padding.into();
Expand Down

0 comments on commit b17f890

Please sign in to comment.