#[repr(C)]pub struct SystemColors {Show 21 fields
pub text: OptionColorU,
pub secondary_text: OptionColorU,
pub tertiary_text: OptionColorU,
pub background: OptionColorU,
pub accent: OptionColorU,
pub accent_text: OptionColorU,
pub button_face: OptionColorU,
pub button_text: OptionColorU,
pub disabled_text: OptionColorU,
pub window_background: OptionColorU,
pub under_page_background: OptionColorU,
pub selection_background: OptionColorU,
pub selection_text: OptionColorU,
pub selection_background_inactive: OptionColorU,
pub selection_text_inactive: OptionColorU,
pub link: OptionColorU,
pub separator: OptionColorU,
pub grid: OptionColorU,
pub find_highlight: OptionColorU,
pub sidebar_background: OptionColorU,
pub sidebar_selection: OptionColorU,
}Expand description
Common system colors used for UI elements.
These colors are queried from the operating system and automatically adapt to the current theme (light/dark mode) and accent color settings.
On macOS, these correspond to NSColor semantic colors. On Windows, these come from UISettings. On Linux/GTK, these come from the GTK theme.
Fields§
§text: OptionColorUPrimary text color (NSColor.textColor on macOS)
secondary_text: OptionColorUSecondary text color for less prominent text (NSColor.secondaryLabelColor)
tertiary_text: OptionColorUTertiary text color for disabled/placeholder text (NSColor.tertiaryLabelColor)
background: OptionColorUBackground color for content areas (NSColor.textBackgroundColor)
accent: OptionColorUSystem accent color chosen by user (NSColor.controlAccentColor on macOS)
accent_text: OptionColorUText color on accent backgrounds
Button/control background (NSColor.controlColor)
Button/control text color (NSColor.controlTextColor)
disabled_text: OptionColorUDisabled control text color (NSColor.disabledControlTextColor)
window_background: OptionColorUWindow background color (NSColor.windowBackgroundColor)
under_page_background: OptionColorUUnder-page background color (NSColor.underPageBackgroundColor)
selection_background: OptionColorUSelection background when window is focused (NSColor.selectedContentBackgroundColor)
selection_text: OptionColorUSelection text color when window is focused
selection_background_inactive: OptionColorUSelection background when window is NOT focused (NSColor.unemphasizedSelectedContentBackgroundColor) This is used for :backdrop state styling
selection_text_inactive: OptionColorUSelection text color when window is NOT focused
link: OptionColorULink color (NSColor.linkColor)
separator: OptionColorUSeparator/divider color (NSColor.separatorColor)
grid: OptionColorUGrid/table line color (NSColor.gridColor)
find_highlight: OptionColorUFind/search highlight color (NSColor.findHighlightColor)
Sidebar background color
Selected row in sidebar
Trait Implementations§
Source§impl Clone for SystemColors
impl Clone for SystemColors
Source§fn clone(&self) -> SystemColors
fn clone(&self) -> SystemColors
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more