Added the ability to change the style of a TextEditor
This commit is contained in:
parent
fc285d3e46
commit
07b0aed5d3
1 changed files with 9 additions and 0 deletions
|
|
@ -128,6 +128,15 @@ where
|
|||
highlighter_format: to_format,
|
||||
}
|
||||
}
|
||||
|
||||
/// Sets the style of the [`TextEditor`].
|
||||
pub fn style(
|
||||
mut self,
|
||||
style: impl Into<<Renderer::Theme as StyleSheet>::Style>,
|
||||
) -> Self {
|
||||
self.style = style.into();
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
/// The content of a [`TextEditor`].
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue