#[repr(C)]pub enum SystemColorRef {
Text = 0,
Background = 1,
Accent = 2,
AccentText = 3,
ButtonFace = 4,
ButtonText = 5,
WindowBackground = 6,
SelectionBackground = 7,
SelectionText = 8,
}Expand description
Reference to a specific system color. These are resolved at runtime based on the user’s system preferences.
Variants§
Text = 0
System text color (e.g., black on light theme, white on dark)
Background = 1
System background color
Accent = 2
System accent color (user-selected highlight color)
AccentText = 3
Text color when on accent background
ButtonFace = 4
Button face background color
ButtonText = 5
Button text color
WindowBackground = 6
Window/panel background color
SelectionBackground = 7
Selection/highlight background color
SelectionText = 8
Text color when selected
Implementations§
Source§impl SystemColorRef
impl SystemColorRef
Sourcepub fn resolve(&self, colors: &SystemColors, fallback: ColorU) -> ColorU
pub fn resolve(&self, colors: &SystemColors, fallback: ColorU) -> ColorU
Resolve this system color reference against actual system colors.
Sourcepub fn as_css_str(&self) -> &'static str
pub fn as_css_str(&self) -> &'static str
Get the CSS syntax for this system color reference.
Trait Implementations§
Source§impl Clone for SystemColorRef
impl Clone for SystemColorRef
Source§fn clone(&self) -> SystemColorRef
fn clone(&self) -> SystemColorRef
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SystemColorRef
impl Debug for SystemColorRef
Source§impl Hash for SystemColorRef
impl Hash for SystemColorRef
Source§impl Ord for SystemColorRef
impl Ord for SystemColorRef
Source§fn cmp(&self, other: &SystemColorRef) -> Ordering
fn cmp(&self, other: &SystemColorRef) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SystemColorRef
impl PartialEq for SystemColorRef
Source§impl PartialOrd for SystemColorRef
impl PartialOrd for SystemColorRef
impl Copy for SystemColorRef
impl Eq for SystemColorRef
impl StructuralPartialEq for SystemColorRef
Auto Trait Implementations§
impl Freeze for SystemColorRef
impl RefUnwindSafe for SystemColorRef
impl Send for SystemColorRef
impl Sync for SystemColorRef
impl Unpin for SystemColorRef
impl UnsafeUnpin for SystemColorRef
impl UnwindSafe for SystemColorRef
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