pub struct InputEditorStyle {
pub foreground: Hsla,
pub muted_foreground: Hsla,
pub background: Hsla,
pub border: Hsla,
pub selection: Hsla,
pub caret: Hsla,
pub diagnostics: DiagnosticColors,
pub highlight_styles: SharedHighlightStyleResolver,
pub editor_invisible: Option<Hsla>,
pub editor_active_line: Option<Hsla>,
pub editor_gutter_background: Option<Hsla>,
pub fold_icon_renderer: Option<FoldIconRenderer>,
}Expand description
Application-owned colors and highlight resolver consumed by editor painting.
Fields§
§foreground: Hsla§muted_foreground: Hsla§background: Hsla§border: Hsla§selection: Hsla§caret: Hsla§diagnostics: DiagnosticColors§highlight_styles: SharedHighlightStyleResolver§editor_invisible: Option<Hsla>§editor_active_line: Option<Hsla>§editor_gutter_background: Option<Hsla>§fold_icon_renderer: Option<FoldIconRenderer>Implementations§
Source§impl InputEditorStyle
impl InputEditorStyle
Sourcepub fn resolved(&self, tokens: &SemanticThemeTokens) -> Self
pub fn resolved(&self, tokens: &SemanticThemeTokens) -> Self
Fills in every colour that was left unset, from the active palette.
Hsla::default() is fully transparent, and every colour on Default is
that — so an input nothing projected onto painted its glyphs, its caret
and its selection in nothing at all. Transparent is not a colour anyone
means for ink, which is what makes it usable as “unset” here.
This is resolution, not assignment: whatever a consumer did project is
kept exactly. crates/component projects the whole style on every render and
never reaches this; a consumer that projects once at construction gets
the palette that is current now rather than the one that happened to be
installed when the state was built.
Trait Implementations§
Source§impl Clone for InputEditorStyle
impl Clone for InputEditorStyle
Source§fn clone(&self) -> InputEditorStyle
fn clone(&self) -> InputEditorStyle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for InputEditorStyle
impl !Send for InputEditorStyle
impl !Sync for InputEditorStyle
impl !UnwindSafe for InputEditorStyle
impl Freeze for InputEditorStyle
impl Unpin for InputEditorStyle
impl UnsafeUnpin for InputEditorStyle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().