pub struct ThemeSettings {
Show 30 fields pub foreground: Option<Color>, pub background: Option<Color>, pub caret: Option<Color>, pub line_highlight: Option<Color>, pub misspelling: Option<Color>, pub minimap_border: Option<Color>, pub accent: Option<Color>, pub popup_css: Option<String>, pub phantom_css: Option<String>, pub bracket_contents_foreground: Option<Color>, pub bracket_contents_options: Option<UnderlineOption>, pub brackets_foreground: Option<Color>, pub brackets_background: Option<Color>, pub brackets_options: Option<UnderlineOption>, pub tags_foreground: Option<Color>, pub tags_options: Option<UnderlineOption>, pub highlight: Option<Color>, pub find_highlight: Option<Color>, pub find_highlight_foreground: Option<Color>, pub gutter: Option<Color>, pub gutter_foreground: Option<Color>, pub selection: Option<Color>, pub selection_foreground: Option<Color>, pub selection_border: Option<Color>, pub inactive_selection: Option<Color>, pub inactive_selection_foreground: Option<Color>, pub guide: Option<Color>, pub active_guide: Option<Color>, pub stack_guide: Option<Color>, pub shadow: Option<Color>,
}
Expand description

Properties for styling the UI of a text editor

This essentially consists of the styles that aren’t directly applied to the text being viewed. ThemeSettings are intended to be used to make the UI of the editor match the styling of the text itself.

Fields§

§foreground: Option<Color>

The default color for text.

§background: Option<Color>

The default backgound color of the view.

§caret: Option<Color>

Color of the caret.

§line_highlight: Option<Color>

Color of the line the caret is in. Only used when the highlight_line setting is set to true.

§misspelling: Option<Color>

The color to use for the squiggly underline drawn under misspelled words.

§minimap_border: Option<Color>

The color of the border drawn around the viewport area of the minimap. Only used when the draw_minimap_border setting is enabled.

§accent: Option<Color>

A color made available for use by the theme.

§popup_css: Option<String>

CSS passed to popups.

§phantom_css: Option<String>

CSS passed to phantoms.

§bracket_contents_foreground: Option<Color>

Color of bracketed sections of text when the caret is in a bracketed section. Only applied when the match_brackets setting is set to true.

§bracket_contents_options: Option<UnderlineOption>

Controls certain options when the caret is in a bracket section. Only applied when the match_brackets setting is set to true.

§brackets_foreground: Option<Color>

Foreground color of the brackets when the caret is next to a bracket. Only applied when the match_brackets setting is set to true.

§brackets_background: Option<Color>

Background color of the brackets when the caret is next to a bracket. Only applied when the match_brackets setting is set to true.

§brackets_options: Option<UnderlineOption>

Controls certain options when the caret is next to a bracket. Only applied when the match_brackets setting is set to true.

§tags_foreground: Option<Color>

Color of tags when the caret is next to a tag. Only used when the match_tags setting is set to true.

§tags_options: Option<UnderlineOption>

Controls certain options when the caret is next to a tag. Only applied when the match_tags setting is set to true.

§highlight: Option<Color>

The border color for “other” matches.

§find_highlight: Option<Color>

Background color of regions matching the current search.

§find_highlight_foreground: Option<Color>

Text color of regions matching the current search.

§gutter: Option<Color>

Background color of the gutter.

§gutter_foreground: Option<Color>

Foreground color of the gutter.

§selection: Option<Color>

The background color of selected text.

§selection_foreground: Option<Color>

A color that will override the scope-based text color of the selection.

§selection_border: Option<Color>

Color of the selection regions border.

§inactive_selection: Option<Color>

The background color of a selection in a view that is not currently focused.

§inactive_selection_foreground: Option<Color>

A color that will override the scope-based text color of the selection in a view that is not currently focused.

§guide: Option<Color>

Color of the guides displayed to indicate nesting levels.

§active_guide: Option<Color>

Color of the guide lined up with the caret. Only applied if the indent_guide_options setting is set to draw_active.

§stack_guide: Option<Color>

Color of the current guide’s parent guide level. Only used if the indent_guide_options setting is set to draw_active.

§shadow: Option<Color>

The color of the shadow used when a text area can be horizontally scrolled.

Trait Implementations§

source§

impl Clone for ThemeSettings

source§

fn clone(&self) -> ThemeSettings

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ThemeSettings

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ThemeSettings

source§

fn default() -> ThemeSettings

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for ThemeSettings

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for ThemeSettings

source§

fn eq(&self, other: &ThemeSettings) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for ThemeSettings

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for ThemeSettings

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,