Files
coop/crates/theme/src/scrollbar_mode.rs
reya fad30a89f1
Some checks failed
Rust / build (ubuntu-latest, stable) (push) Failing after 5m17s
.
2026-02-19 10:10:16 +07:00

25 lines
513 B
Rust

use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default, Serialize, Deserialize, JsonSchema)]
pub enum ScrollbarMode {
#[default]
Hover,
Scrolling,
Always,
}
impl ScrollbarMode {
pub fn is_scrolling(&self) -> bool {
matches!(self, Self::Scrolling)
}
pub fn is_hover(&self) -> bool {
matches!(self, Self::Hover)
}
pub fn is_always(&self) -> bool {
matches!(self, Self::Always)
}
}