pub struct CoreTheme {Show 29 fields
pub background: Color,
pub foreground: Color,
pub card: Color,
pub card_foreground: Color,
pub popover: Color,
pub popover_foreground: Color,
pub primary: Color,
pub primary_foreground: Color,
pub secondary: Color,
pub secondary_foreground: Color,
pub muted: Color,
pub muted_foreground: Color,
pub accent: Color,
pub accent_foreground: Color,
pub danger: Color,
pub danger_foreground: Color,
pub success: Color,
pub success_foreground: Color,
pub warning: Color,
pub warning_foreground: Color,
pub info: Color,
pub info_foreground: Color,
pub border: Color,
pub input: Color,
pub ring: Color,
pub sidebar: Color,
pub sidebar_foreground: Color,
pub list_hover: Color,
pub list_active: Color,
}Expand description
核心主题配色令牌(供 cx.theme() 直接访问,包含亮色/暗色双模式)。
色板采用现代 Shadcn / Zinc 中性桌面风格,提供完整的表面层级、交互状态、
语义警示(danger / success / warning / info)、输入框边框(input)、
键盘焦点环(ring)与侧边栏/列表高亮令牌。
Fields§
§background: Color§foreground: Color§card: Color§card_foreground: Color§popover: Color§popover_foreground: Color§primary: Color§primary_foreground: Color§secondary: Color§secondary_foreground: Color§muted: Color§muted_foreground: Color§accent: Color§accent_foreground: Color§danger: Color§danger_foreground: Color§success: Color§success_foreground: Color§warning: Color§warning_foreground: Color§info: Color§info_foreground: Color§border: Color§input: Color§ring: Color§list_hover: Color§list_active: ColorImplementations§
Trait Implementations§
impl Copy for CoreTheme
impl Eq for CoreTheme
impl StructuralPartialEq for CoreTheme
Auto Trait Implementations§
impl Forget for CoreTheme
impl Freeze for CoreTheme
impl Move for CoreTheme
impl RefUnwindSafe for CoreTheme
impl Send for CoreTheme
impl Sync for CoreTheme
impl Unpin for CoreTheme
impl UnsafeUnpin for CoreTheme
impl UnwindSafe for CoreTheme
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> FluentBuilder for T
impl<T> FluentBuilder for T
Source§fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
当
condition 为 true 时执行闭包修饰自身,否则原样返回。Source§fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Self
fn when_else( self, condition: bool, then: impl FnOnce(Self) -> Self, else_fn: impl FnOnce(Self) -> Self, ) -> Self
根据
condition 在两个修饰分支之间二选一。Source§fn when_some<O>(
self,
option: Option<O>,
then: impl FnOnce(Self, O) -> Self,
) -> Self
fn when_some<O>( self, option: Option<O>, then: impl FnOnce(Self, O) -> Self, ) -> Self
当
option 为 Some(value) 时执行闭包修饰自身,否则原样返回。