diff options
Diffstat (limited to 'widget')
| -rw-r--r-- | widget/src/text_editor.rs | 9 | 
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`]. | 
