pub enum ThemeTransitionMode {
On,
Off,
Ms(u64),
}Expand description
Animated theme-transition mode, parsed from theme_transition:
"on"(default): cross-fade theme changes over the default 350 ms."off": instant snap — accessibility, and mercy on tmux-over-ssh.- integer milliseconds: cross-fade over that duration (clamped to
0–2000 ms;
0behaves likeoff).
Purely a TUI presentation knob: it changes how a new palette is applied, never which palette wins.
Variants§
Implementations§
Source§impl ThemeTransitionMode
impl ThemeTransitionMode
Sourcepub const DEFAULT_MS: u64 = 350
pub const DEFAULT_MS: u64 = 350
Default cross-fade duration for On (and the fallback when a live
palette update carries no advisory duration of its own).
Sourcepub const MAX_MS: u64 = 2000
pub const MAX_MS: u64 = 2000
Duration ceiling — both this knob and MXC wire fade_ms clamp here.
Sourcepub fn parse(val: &str) -> Option<ThemeTransitionMode>
pub fn parse(val: &str) -> Option<ThemeTransitionMode>
Parse a config value (case-insensitive). Returns None for unknown
values so the caller can warn and fall back to the default.
Sourcepub fn duration_ms(self) -> u64
pub fn duration_ms(self) -> u64
Effective default duration in milliseconds; 0 means “snap”.
Trait Implementations§
Source§impl Clone for ThemeTransitionMode
impl Clone for ThemeTransitionMode
impl Copy for ThemeTransitionMode
Source§impl Debug for ThemeTransitionMode
impl Debug for ThemeTransitionMode
Source§impl Default for ThemeTransitionMode
impl Default for ThemeTransitionMode
impl Eq for ThemeTransitionMode
Source§impl PartialEq for ThemeTransitionMode
impl PartialEq for ThemeTransitionMode
impl StructuralPartialEq for ThemeTransitionMode
Auto Trait Implementations§
impl Freeze for ThemeTransitionMode
impl RefUnwindSafe for ThemeTransitionMode
impl Send for ThemeTransitionMode
impl Sync for ThemeTransitionMode
impl Unpin for ThemeTransitionMode
impl UnsafeUnpin for ThemeTransitionMode
impl UnwindSafe for ThemeTransitionMode
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<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.