pub struct AppTheme {Show 28 fields
pub primary: Color,
pub success: Color,
pub warning: Color,
pub caution: Color,
pub danger: Color,
pub info: Color,
pub sensor_temperature: Color,
pub sensor_humidity: Color,
pub sensor_pressure: Color,
pub sensor_radiation: Color,
pub series_co2: Color,
pub series_radon: Color,
pub series_radiation: Color,
pub trend_rising: Color,
pub trend_falling: Color,
pub trend_stable: Color,
pub signal_excellent: Color,
pub signal_good: Color,
pub signal_fair: Color,
pub signal_weak: Color,
pub signal_offline: Color,
pub text_primary: Color,
pub text_secondary: Color,
pub text_muted: Color,
pub border_active: Color,
pub border_inactive: Color,
pub bg_selected: Color,
pub bg_header: Color,
}Expand description
Application theme with all UI colors.
Colors are based on the Tailwind CSS palette for consistency.
Fields§
§primary: Color§success: Color§warning: Color§caution: Color§danger: Color§info: Color§sensor_temperature: Color§sensor_humidity: Color§sensor_pressure: Color§sensor_radiation: Color§series_co2: Color§series_radon: Color§series_radiation: Color§trend_rising: Color§trend_falling: Color§trend_stable: Color§signal_excellent: Color§signal_good: Color§signal_fair: Color§signal_weak: Color§signal_offline: Color§text_primary: Color§text_secondary: Color§text_muted: Color§border_active: Color§border_inactive: Color§bg_selected: Color§bg_header: ColorImplementations§
Source§impl AppTheme
impl AppTheme
Sourcepub fn border_active_style(&self) -> Style
pub fn border_active_style(&self) -> Style
Style for active/focused borders.
Sourcepub fn border_inactive_style(&self) -> Style
pub fn border_inactive_style(&self) -> Style
Style for inactive borders.
Sourcepub fn selected_style(&self) -> Style
pub fn selected_style(&self) -> Style
Style for selected items (inverted/highlighted).
Sourcepub fn title_style(&self) -> Style
pub fn title_style(&self) -> Style
Style for titles.
Sourcepub fn header_style(&self) -> Style
pub fn header_style(&self) -> Style
Style for header/app bar.
Sourcepub fn co2_level_color(&self, ppm: u16) -> Color
pub fn co2_level_color(&self, ppm: u16) -> Color
Semantic color for CO2 levels.
Sourcepub fn radon_level_color(&self, bq_m3: u32) -> Color
pub fn radon_level_color(&self, bq_m3: u32) -> Color
Semantic color for radon levels.
Sourcepub fn battery_level_color(&self, percent: u8) -> Color
pub fn battery_level_color(&self, percent: u8) -> Color
Semantic color for battery levels.
Sourcepub fn sensor_status_color(&self, status: &Status) -> Color
pub fn sensor_status_color(&self, status: &Status) -> Color
Semantic color for a sensor-reported status.
Sourcepub fn connection_color(&self, status: &ConnectionStatus) -> Color
pub fn connection_color(&self, status: &ConnectionStatus) -> Color
Semantic color for connection state.
Sourcepub fn signal_strength_display(&self, rssi: i16) -> (&'static str, Color)
pub fn signal_strength_display(&self, rssi: i16) -> (&'static str, Color)
Signal bars and color for RSSI strength.
Sourcepub fn trend_color(&self, diff: i32, threshold: i32) -> Color
pub fn trend_color(&self, diff: i32, threshold: i32) -> Color
Semantic color for trend direction.
Trait Implementations§
impl Copy for AppTheme
Auto Trait Implementations§
impl Freeze for AppTheme
impl RefUnwindSafe for AppTheme
impl Send for AppTheme
impl Sync for AppTheme
impl Unpin for AppTheme
impl UnsafeUnpin for AppTheme
impl UnwindSafe for AppTheme
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
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