#[non_exhaustive]pub struct GraphColors {
pub background: Hsla,
pub surface: Hsla,
pub foreground: Hsla,
pub muted: Hsla,
pub border: Hsla,
pub edge: Hsla,
pub edge_active: Hsla,
pub selection: Hsla,
pub focus_ring: Hsla,
pub ungrouped: Hsla,
pub on_fill_light: Hsla,
pub on_fill_dark: Hsla,
}Expand description
Colors the graph paints with. By default they are derived from the
gpui-base Theme every frame, so appearance changes apply immediately.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.background: Hsla§surface: HslaTooltip and label-chip background.
foreground: Hsla§muted: Hsla§border: Hsla§edge: Hsla§edge_active: HslaEdges touching the hovered / selected item.
selection: HslaRing around the selected item.
focus_ring: HslaKeyboard focus indicator, distinct from selection.
ungrouped: HslaNodes without a group when coloring by group.
on_fill_light: HslaText drawn on top of node fills; the one with better contrast is used.
on_fill_dark: HslaImplementations§
Source§impl GraphColors
impl GraphColors
Source§impl GraphColors
impl GraphColors
pub fn with_background(self, value: Hsla) -> Self
pub fn with_surface(self, value: Hsla) -> Self
pub fn with_foreground(self, value: Hsla) -> Self
pub fn with_muted(self, value: Hsla) -> Self
pub fn with_border(self, value: Hsla) -> Self
pub fn with_edge(self, value: Hsla) -> Self
pub fn with_edge_active(self, value: Hsla) -> Self
pub fn with_selection(self, value: Hsla) -> Self
pub fn with_focus_ring(self, value: Hsla) -> Self
pub fn with_ungrouped(self, value: Hsla) -> Self
Trait Implementations§
Source§impl Clone for GraphColors
impl Clone for GraphColors
Auto Trait Implementations§
impl Freeze for GraphColors
impl RefUnwindSafe for GraphColors
impl Send for GraphColors
impl Sync for GraphColors
impl Unpin for GraphColors
impl UnsafeUnpin for GraphColors
impl UnwindSafe for GraphColors
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 more