summaryrefslogtreecommitdiffstats
path: root/widget
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2023-12-07 02:48:18 +0100
committerLibravatar GitHub <noreply@github.com>2023-12-07 02:48:18 +0100
commiteaaea414b8544b883c0388a5a92cbb0df7fc6633 (patch)
treebc738a00d6974586fb31cfaec26156bcc0bf4628 /widget
parentfc285d3e461626408c56bbc1605fcf0c974b2f69 (diff)
parent07b0aed5d35013a17deea7ce7824c744decef568 (diff)
downloadiced-eaaea414b8544b883c0388a5a92cbb0df7fc6633.tar.gz
iced-eaaea414b8544b883c0388a5a92cbb0df7fc6633.tar.bz2
iced-eaaea414b8544b883c0388a5a92cbb0df7fc6633.zip
Merge pull request #2159 from bungoboingo/fix/text-editor-style
[Fix] Add ability to change style of `TextEditor`
Diffstat (limited to 'widget')
-rw-r--r--widget/src/text_editor.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/widget/src/text_editor.rs b/widget/src/text_editor.rs
index 63d48868..a2a186f0 100644
--- a/widget/src/text_editor.rs
+++ b/widget/src/text_editor.rs
@@ -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`].