chore: audit components
This commit is contained in:
+25
-26
@@ -3,34 +3,33 @@
|
||||
|
||||
use crate::IconRole;
|
||||
|
||||
/// The Segoe Fluent Icons codepoint for the role.
|
||||
pub(crate) fn glyph(role: IconRole) -> Option<char> {
|
||||
let codepoint = match role {
|
||||
// No Segoe spinner glyph; the icon falls back to the bundled SVG,
|
||||
// which the spinner rotates.
|
||||
/// The Segoe Fluent Icons glyph for the role.
|
||||
pub(crate) fn glyph(role: IconRole) -> Option<&'static str> {
|
||||
let glyph = match role {
|
||||
IconRole::Check => "\u{E73E}", // CheckMark
|
||||
IconRole::Close => "\u{E8BB}", // ChromeClose
|
||||
IconRole::ChevronDown => "\u{E70D}", // ChevronDown
|
||||
IconRole::ChevronLeft => "\u{E76B}", // ChevronLeft
|
||||
IconRole::ChevronRight => "\u{E76C}", // ChevronRight
|
||||
IconRole::ChevronUp => "\u{E70E}", // ChevronUp
|
||||
IconRole::Plus => "\u{E710}", // Add
|
||||
IconRole::Minus => "\u{E738}", // Remove
|
||||
IconRole::Search => "\u{E721}", // Search
|
||||
IconRole::Folder => "\u{E8B7}", // Folder
|
||||
IconRole::Warning => "\u{E7BA}", // Warning
|
||||
IconRole::Info => "\u{E946}", // Info
|
||||
IconRole::Copy => "\u{E8C8}", // Copy
|
||||
IconRole::Eye => "\u{E7B3}", // RedEye
|
||||
IconRole::EyeOff => "\u{ED1A}", // Hide
|
||||
IconRole::PanelLeft => "\u{E90C}", // DockLeft
|
||||
IconRole::PanelRight => "\u{E90D}", // DockRight
|
||||
IconRole::WindowMinimize => "\u{E921}", // ChromeMinimize
|
||||
IconRole::WindowMaximize => "\u{E922}", // ChromeMaximize
|
||||
IconRole::WindowRestore => "\u{E923}", // ChromeRestore
|
||||
// No Segoe spinner glyph, the icon falls back to the bundled SVG.
|
||||
IconRole::Loader => return None,
|
||||
IconRole::Check => 0xE73E, // CheckMark
|
||||
IconRole::Close => 0xE8BB, // ChromeClose
|
||||
IconRole::ChevronDown => 0xE70D, // ChevronDown
|
||||
IconRole::ChevronLeft => 0xE76B, // ChevronLeft
|
||||
IconRole::ChevronRight => 0xE76C, // ChevronRight
|
||||
IconRole::ChevronUp => 0xE70E, // ChevronUp
|
||||
IconRole::Plus => 0xE710, // Add
|
||||
IconRole::Minus => 0xE738, // Remove
|
||||
IconRole::Search => 0xE721, // Search
|
||||
IconRole::Folder => 0xE8B7, // Folder
|
||||
IconRole::Warning => 0xE7BA, // Warning
|
||||
IconRole::Info => 0xE946, // Info
|
||||
IconRole::Copy => 0xE8C8, // Copy
|
||||
IconRole::Eye => 0xE7B3, // RedEye
|
||||
IconRole::EyeOff => 0xED1A, // Hide
|
||||
IconRole::PanelLeft => 0xE90C, // DockLeft
|
||||
IconRole::PanelRight => 0xE90D, // DockRight
|
||||
IconRole::WindowMinimize => 0xE921, // ChromeMinimize
|
||||
IconRole::WindowMaximize => 0xE922, // ChromeMaximize
|
||||
IconRole::WindowRestore => 0xE923, // ChromeRestore
|
||||
};
|
||||
char::from_u32(codepoint)
|
||||
Some(glyph)
|
||||
}
|
||||
|
||||
/// The system font the codepoints resolve against (Windows 11+).
|
||||
|
||||
Reference in New Issue
Block a user