Skip to content

Commit eaaea41

Browse files
authored
Merge pull request #2159 from bungoboingo/fix/text-editor-style
[Fix] Add ability to change style of `TextEditor`
2 parents fc285d3 + 07b0aed commit eaaea41

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

widget/src/text_editor.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,15 @@ where
128128
highlighter_format: to_format,
129129
}
130130
}
131+
132+
/// Sets the style of the [`TextEditor`].
133+
pub fn style(
134+
mut self,
135+
style: impl Into<<Renderer::Theme as StyleSheet>::Style>,
136+
) -> Self {
137+
self.style = style.into();
138+
self
139+
}
131140
}
132141

133142
/// The content of a [`TextEditor`].

0 commit comments

Comments
 (0)