pub struct CodeEditorColors {
pub container: Option<ColorRole>,
pub gutter: Option<ColorRole>,
pub line_number: Option<ColorRole>,
pub current_line_number: Option<ColorRole>,
pub current_line: Option<ColorRole>,
pub current_line_gutter: Option<ColorRole>,
}Expand description
The colours of an editor’s own parts, each a role of the theme.
A part that is not named keeps the colour the design system gives it, so an application can set the container and the gutter and leave the rest. Roles and never literals: the colours follow the theme from light to dark like every other colour here.
Fields§
§container: Option<ColorRole>What the text sits on.
gutter: Option<ColorRole>What the line numbers sit on.
line_number: Option<ColorRole>§current_line_number: Option<ColorRole>The number of the line the caret is on.
current_line: Option<ColorRole>The band behind the line the caret is on.
current_line_gutter: Option<ColorRole>The gutter beside the line the caret is on, so the band runs across the whole row. Unset, the gutter keeps its own colour on that row.
Implementations§
Source§impl CodeEditorColors
impl CodeEditorColors
pub const fn container(self, role: ColorRole) -> Self
pub const fn gutter(self, role: ColorRole) -> Self
pub const fn line_number(self, role: ColorRole) -> Self
pub const fn current_line_number(self, role: ColorRole) -> Self
pub const fn current_line(self, role: ColorRole) -> Self
pub const fn current_line_gutter(self, role: ColorRole) -> Self
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Whether every part is left to the design system, in which case there is nothing to send.
Sourcepub fn from_bytes(bytes: &[u8]) -> Option<Self>
pub fn from_bytes(bytes: &[u8]) -> Option<Self>
The record read back. None where the bytes are not one whole record or name a
role this side does not know, which is what the Renderer refuses too.