Skip to main content

euv_ui/component/avatar/view/
impl.rs

1use super::*;
2
3impl EuvAvatarSize {
4    /// Returns the square edge length in pixels for this size.
5    ///
6    /// # Returns
7    ///
8    /// - `i32` - The edge length in pixels: 24 for `Small`, 32 for `Medium`,
9    ///   40 for `Large`.
10    pub fn px(&self) -> i32 {
11        match self {
12            EuvAvatarSize::Small => 24,
13            EuvAvatarSize::Medium => 32,
14            EuvAvatarSize::Large => 40,
15        }
16    }
17}