//! UI mode state.
/// Application UI mode.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
pub enum AppMode {
/// Full mode with all panels
#[default]
Full,
/// Minimal overlay mode
Overlay,
/// Settings panel
Settings,
}
impl AppMode {
/// Get the window title suffix.
pub fn title_suffix(&self) -> &str {
match self {
AppMode::Full => "",
AppMode::Overlay => " (Overlay)",
AppMode::Settings => " - Settings",
}
}
/// Should the window be always on top?
pub fn always_on_top(&self) -> bool {
matches!(self, AppMode::Overlay)
}
/// Should the window be transparent?
pub fn transparent(&self) -> bool {
matches!(self, AppMode::Overlay)
}
}