icons: add 46 more icon roles

This commit is contained in:
2026-11-13 05:01:31 +07:00
parent dad833f998
commit c3e3c37731
48 changed files with 1092 additions and 23 deletions
+350
View File
@@ -43,6 +43,51 @@ pub enum IconRole {
Loader,
Microphone,
Stop,
Settings,
Refresh,
Undo,
Redo,
ZoomIn,
ZoomOut,
Trash,
Edit,
Save,
Download,
Share,
Send,
Print,
EnterFullScreen,
ExitFullScreen,
Cut,
Paste,
Sort,
Home,
Menu,
More,
Grid,
List,
File,
Image,
Calendar,
Clock,
User,
Lock,
Unlock,
Star,
Heart,
Pin,
Mail,
Link,
Play,
Pause,
Help,
Volume,
VolumeMuted,
AlignLeft,
AlignCenter,
AlignRight,
Sun,
Moon,
}
impl IconRole {
@@ -71,6 +116,51 @@ impl IconRole {
Self::Loader,
Self::Microphone,
Self::Stop,
Self::Settings,
Self::Refresh,
Self::Undo,
Self::Redo,
Self::ZoomIn,
Self::ZoomOut,
Self::Trash,
Self::Edit,
Self::Save,
Self::Download,
Self::Share,
Self::Send,
Self::Print,
Self::EnterFullScreen,
Self::ExitFullScreen,
Self::Cut,
Self::Paste,
Self::Sort,
Self::Home,
Self::Menu,
Self::More,
Self::Grid,
Self::List,
Self::File,
Self::Image,
Self::Calendar,
Self::Clock,
Self::User,
Self::Lock,
Self::Unlock,
Self::Star,
Self::Heart,
Self::Pin,
Self::Mail,
Self::Link,
Self::Play,
Self::Pause,
Self::Help,
Self::Volume,
Self::VolumeMuted,
Self::AlignLeft,
Self::AlignCenter,
Self::AlignRight,
Self::Sun,
Self::Moon,
]
}
@@ -99,6 +189,51 @@ impl IconRole {
Self::Loader => "icons/loader.svg",
Self::Microphone => "icons/mic.svg",
Self::Stop => "icons/square.svg",
Self::Settings => "icons/settings.svg",
Self::Refresh => "icons/refresh-cw.svg",
Self::Undo => "icons/undo-2.svg",
Self::Redo => "icons/redo-2.svg",
Self::ZoomIn => "icons/zoom-in.svg",
Self::ZoomOut => "icons/zoom-out.svg",
Self::Trash => "icons/trash.svg",
Self::Edit => "icons/pencil.svg",
Self::Save => "icons/save.svg",
Self::Download => "icons/download.svg",
Self::Share => "icons/share.svg",
Self::Send => "icons/send.svg",
Self::Print => "icons/printer.svg",
Self::EnterFullScreen => "icons/maximize.svg",
Self::ExitFullScreen => "icons/minimize.svg",
Self::Cut => "icons/scissors.svg",
Self::Paste => "icons/clipboard-paste.svg",
Self::Sort => "icons/arrow-up-down.svg",
Self::Home => "icons/house.svg",
Self::Menu => "icons/menu.svg",
Self::More => "icons/ellipsis.svg",
Self::Grid => "icons/layout-grid.svg",
Self::List => "icons/list.svg",
Self::File => "icons/file.svg",
Self::Image => "icons/image.svg",
Self::Calendar => "icons/calendar.svg",
Self::Clock => "icons/clock.svg",
Self::User => "icons/user.svg",
Self::Lock => "icons/lock.svg",
Self::Unlock => "icons/lock-open.svg",
Self::Star => "icons/star.svg",
Self::Heart => "icons/heart.svg",
Self::Pin => "icons/pin.svg",
Self::Mail => "icons/mail.svg",
Self::Link => "icons/link.svg",
Self::Play => "icons/play.svg",
Self::Pause => "icons/pause.svg",
Self::Help => "icons/circle-question-mark.svg",
Self::Volume => "icons/volume-2.svg",
Self::VolumeMuted => "icons/volume-x.svg",
Self::AlignLeft => "icons/text-align-start.svg",
Self::AlignCenter => "icons/text-align-center.svg",
Self::AlignRight => "icons/text-align-end.svg",
Self::Sun => "icons/sun.svg",
Self::Moon => "icons/moon.svg",
}
}
@@ -128,6 +263,51 @@ impl IconRole {
Self::Loader => "loader",
Self::Microphone => "microphone",
Self::Stop => "stop",
Self::Settings => "settings",
Self::Refresh => "refresh",
Self::Undo => "undo",
Self::Redo => "redo",
Self::ZoomIn => "zoom-in",
Self::ZoomOut => "zoom-out",
Self::Trash => "trash",
Self::Edit => "edit",
Self::Save => "save",
Self::Download => "download",
Self::Share => "share",
Self::Send => "send",
Self::Print => "print",
Self::EnterFullScreen => "enter-full-screen",
Self::ExitFullScreen => "exit-full-screen",
Self::Cut => "cut",
Self::Paste => "paste",
Self::Sort => "sort",
Self::Home => "home",
Self::Menu => "menu",
Self::More => "more",
Self::Grid => "grid",
Self::List => "list",
Self::File => "file",
Self::Image => "image",
Self::Calendar => "calendar",
Self::Clock => "clock",
Self::User => "user",
Self::Lock => "lock",
Self::Unlock => "unlock",
Self::Star => "star",
Self::Heart => "heart",
Self::Pin => "pin",
Self::Mail => "mail",
Self::Link => "link",
Self::Play => "play",
Self::Pause => "pause",
Self::Help => "help",
Self::Volume => "volume",
Self::VolumeMuted => "volume-muted",
Self::AlignLeft => "align-left",
Self::AlignCenter => "align-center",
Self::AlignRight => "align-right",
Self::Sun => "sun",
Self::Moon => "moon",
}
}
@@ -206,6 +386,129 @@ impl IconRole {
Self::Loader => &["process-working-symbolic", "process-working"],
Self::Microphone => &["audio-input-microphone-symbolic", "audio-input-microphone"],
Self::Stop => &["process-stop-symbolic", "process-stop"],
Self::Settings => &[
"applications-system-symbolic",
"settings-symbolic",
"preferences-system-symbolic",
"system-run-symbolic",
],
Self::Refresh => &["view-refresh-symbolic", "view-refresh"],
Self::Undo => &["edit-undo-symbolic", "edit-undo"],
Self::Redo => &["edit-redo-symbolic", "edit-redo"],
Self::ZoomIn => &["zoom-in-symbolic", "zoom-in"],
Self::ZoomOut => &["zoom-out-symbolic", "zoom-out"],
Self::Trash => &[
"user-trash-symbolic",
"edit-delete-symbolic",
"user-trash",
"edit-delete",
],
Self::Edit => &["document-edit-symbolic", "document-edit"],
Self::Save => &["document-save-symbolic", "document-save"],
Self::Download => &["folder-download-symbolic", "folder-download"],
Self::Share => &[
"send-to-symbolic",
"emblem-shared-symbolic",
"emblem-shared",
],
Self::Send => &["document-send-symbolic", "document-send"],
Self::Print => &[
"printer-symbolic",
"document-print-symbolic",
"printer",
"document-print",
],
Self::EnterFullScreen => &["view-fullscreen-symbolic", "view-fullscreen"],
Self::ExitFullScreen => &["view-restore-symbolic", "view-restore"],
Self::Cut => &["edit-cut-symbolic", "edit-cut"],
Self::Paste => &["edit-paste-symbolic", "edit-paste"],
Self::Sort => &[
"view-sort-ascending-symbolic",
"view-sort-descending-symbolic",
"view-sort-ascending",
"view-sort-descending",
],
Self::Home => &[
"user-home-symbolic",
"go-home-symbolic",
"user-home",
"go-home",
],
Self::Menu => &["open-menu-symbolic", "open-menu"],
Self::More => &[
"view-more-horizontal-symbolic",
"view-more-symbolic",
"view-more-horizontal",
"view-more",
],
Self::Grid => &["view-grid-symbolic", "view-app-grid-symbolic", "view-grid"],
Self::List => &[
"view-list-symbolic",
"view-list-bullet-symbolic",
"view-list",
"view-list-bullet",
],
Self::File => &[
"text-x-generic-symbolic",
"text-x-generic",
"x-office-document-symbolic",
"x-office-document",
],
Self::Image => &[
"image-x-generic-symbolic",
"insert-image-symbolic",
"image-x-generic",
"insert-image",
],
Self::Calendar => &["x-office-calendar-symbolic", "x-office-calendar"],
Self::Clock => &[
"document-open-recent-symbolic",
"alarm-symbolic",
"clock-symbolic",
"document-open-recent",
],
Self::User => &["avatar-default-symbolic", "avatar-default"],
Self::Lock => &[
"changes-prevent-symbolic",
"changes-prevent",
"system-lock-screen-symbolic",
"system-lock-screen",
],
Self::Unlock => &["changes-allow-symbolic", "changes-allow"],
Self::Star => &[
"non-starred-symbolic",
"non-starred",
"starred-symbolic",
"starred",
],
Self::Heart => &["emote-love-symbolic", "emote-love"],
Self::Pin => &["view-pin-symbolic", "view-pin"],
Self::Mail => &[
"mail-unread-symbolic",
"mail-message-new-symbolic",
"mail-unread",
"mail-message-new",
],
Self::Link => &["insert-link-symbolic", "insert-link"],
Self::Play => &["media-playback-start-symbolic", "media-playback-start"],
Self::Pause => &["media-playback-pause-symbolic", "media-playback-pause"],
Self::Help => &[
"dialog-question-symbolic",
"system-help-symbolic",
"dialog-question",
"system-help",
],
Self::Volume => &["audio-volume-high-symbolic", "audio-volume-high"],
Self::VolumeMuted => &["audio-volume-muted-symbolic", "audio-volume-muted"],
Self::AlignLeft => &["format-justify-left-symbolic", "format-justify-left"],
Self::AlignCenter => &["format-justify-center-symbolic", "format-justify-center"],
Self::AlignRight => &["format-justify-right-symbolic", "format-justify-right"],
Self::Sun => &[
"weather-clear-symbolic",
"display-brightness-symbolic",
"weather-clear",
],
Self::Moon => &["weather-clear-night-symbolic", "weather-clear-night"],
}
}
}
@@ -417,6 +720,53 @@ fn asset_bytes(path: &str) -> Option<&'static [u8]> {
"icons/panel-right.svg" => Some(include_bytes!("../assets/panel-right.svg")),
"icons/loader.svg" => Some(include_bytes!("../assets/loader.svg")),
"icons/mic.svg" => Some(include_bytes!("../assets/mic.svg")),
"icons/settings.svg" => Some(include_bytes!("../assets/settings.svg")),
"icons/refresh-cw.svg" => Some(include_bytes!("../assets/refresh-cw.svg")),
"icons/undo-2.svg" => Some(include_bytes!("../assets/undo-2.svg")),
"icons/redo-2.svg" => Some(include_bytes!("../assets/redo-2.svg")),
"icons/zoom-in.svg" => Some(include_bytes!("../assets/zoom-in.svg")),
"icons/zoom-out.svg" => Some(include_bytes!("../assets/zoom-out.svg")),
"icons/trash.svg" => Some(include_bytes!("../assets/trash.svg")),
"icons/pencil.svg" => Some(include_bytes!("../assets/pencil.svg")),
"icons/save.svg" => Some(include_bytes!("../assets/save.svg")),
"icons/download.svg" => Some(include_bytes!("../assets/download.svg")),
"icons/share.svg" => Some(include_bytes!("../assets/share.svg")),
"icons/send.svg" => Some(include_bytes!("../assets/send.svg")),
"icons/printer.svg" => Some(include_bytes!("../assets/printer.svg")),
"icons/maximize.svg" => Some(include_bytes!("../assets/maximize.svg")),
"icons/minimize.svg" => Some(include_bytes!("../assets/minimize.svg")),
"icons/scissors.svg" => Some(include_bytes!("../assets/scissors.svg")),
"icons/clipboard-paste.svg" => Some(include_bytes!("../assets/clipboard-paste.svg")),
"icons/arrow-up-down.svg" => Some(include_bytes!("../assets/arrow-up-down.svg")),
"icons/house.svg" => Some(include_bytes!("../assets/house.svg")),
"icons/menu.svg" => Some(include_bytes!("../assets/menu.svg")),
"icons/ellipsis.svg" => Some(include_bytes!("../assets/ellipsis.svg")),
"icons/layout-grid.svg" => Some(include_bytes!("../assets/layout-grid.svg")),
"icons/list.svg" => Some(include_bytes!("../assets/list.svg")),
"icons/file.svg" => Some(include_bytes!("../assets/file.svg")),
"icons/image.svg" => Some(include_bytes!("../assets/image.svg")),
"icons/calendar.svg" => Some(include_bytes!("../assets/calendar.svg")),
"icons/clock.svg" => Some(include_bytes!("../assets/clock.svg")),
"icons/user.svg" => Some(include_bytes!("../assets/user.svg")),
"icons/lock.svg" => Some(include_bytes!("../assets/lock.svg")),
"icons/lock-open.svg" => Some(include_bytes!("../assets/lock-open.svg")),
"icons/star.svg" => Some(include_bytes!("../assets/star.svg")),
"icons/heart.svg" => Some(include_bytes!("../assets/heart.svg")),
"icons/pin.svg" => Some(include_bytes!("../assets/pin.svg")),
"icons/mail.svg" => Some(include_bytes!("../assets/mail.svg")),
"icons/link.svg" => Some(include_bytes!("../assets/link.svg")),
"icons/play.svg" => Some(include_bytes!("../assets/play.svg")),
"icons/pause.svg" => Some(include_bytes!("../assets/pause.svg")),
"icons/circle-question-mark.svg" => {
Some(include_bytes!("../assets/circle-question-mark.svg"))
}
"icons/volume-2.svg" => Some(include_bytes!("../assets/volume-2.svg")),
"icons/volume-x.svg" => Some(include_bytes!("../assets/volume-x.svg")),
"icons/text-align-start.svg" => Some(include_bytes!("../assets/text-align-start.svg")),
"icons/text-align-center.svg" => Some(include_bytes!("../assets/text-align-center.svg")),
"icons/text-align-end.svg" => Some(include_bytes!("../assets/text-align-end.svg")),
"icons/sun.svg" => Some(include_bytes!("../assets/sun.svg")),
"icons/moon.svg" => Some(include_bytes!("../assets/moon.svg")),
_ => None,
}
}
+67 -22
View File
@@ -6,28 +6,73 @@ use crate::IconRole;
/// 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
IconRole::Microphone => "\u{E720}", // Microphone
IconRole::Stop => "\u{E71A}", // Stop
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
IconRole::Microphone => "\u{E720}", // Microphone
IconRole::Stop => "\u{E71A}", // Stop
IconRole::Settings => "\u{E713}", // Settings
IconRole::Refresh => "\u{E72C}", // Refresh
IconRole::Undo => "\u{E7A7}", // Undo
IconRole::Redo => "\u{E7A6}", // Redo
IconRole::ZoomIn => "\u{E8A3}", // ZoomIn
IconRole::ZoomOut => "\u{E71F}", // ZoomOut
IconRole::Trash => "\u{E74D}", // Delete
IconRole::Edit => "\u{E70F}", // Edit
IconRole::Save => "\u{E74E}", // Save
IconRole::Download => "\u{E896}", // Download
IconRole::Share => "\u{E72D}", // Share
IconRole::Send => "\u{E724}", // Send
IconRole::Print => "\u{E749}", // Print
IconRole::EnterFullScreen => "\u{E740}", // FullScreen
IconRole::ExitFullScreen => "\u{E73F}", // BackToWindow
IconRole::Cut => "\u{E8C6}", // Cut
IconRole::Paste => "\u{E77F}", // Paste
IconRole::Sort => "\u{E8CB}", // Sort
IconRole::Home => "\u{E80F}", // Home
IconRole::Menu => "\u{E700}", // GlobalNavButton
IconRole::More => "\u{E712}", // More
IconRole::Grid => "\u{ECA5}", // Tiles
IconRole::List => "\u{EA37}", // List
IconRole::File => "\u{E8A5}", // Document
IconRole::Image => "\u{E8B9}", // Picture
IconRole::Calendar => "\u{E787}", // Calendar
IconRole::Clock => "\u{E917}", // Clock
IconRole::User => "\u{E77B}", // Contact
IconRole::Lock => "\u{E72E}", // Lock
IconRole::Unlock => "\u{E785}", // Unlock
IconRole::Star => "\u{E734}", // FavoriteStar
IconRole::Heart => "\u{EB51}", // Heart
IconRole::Pin => "\u{E718}", // Pin
IconRole::Mail => "\u{E715}", // Mail
IconRole::Link => "\u{E71B}", // Link
IconRole::Play => "\u{E768}", // Play
IconRole::Pause => "\u{E769}", // Pause
IconRole::Help => "\u{E897}", // Help
IconRole::Volume => "\u{E767}", // Volume
IconRole::VolumeMuted => "\u{E74F}", // Mute
IconRole::AlignLeft => "\u{E8E4}", // AlignLeft
IconRole::AlignCenter => "\u{E8E3}", // AlignCenter
IconRole::AlignRight => "\u{E8E2}", // AlignRight
IconRole::Sun => "\u{E706}", // Brightness
IconRole::Moon => "\u{E708}", // QuietHours
// No Segoe spinner glyph, the icon falls back to the bundled SVG.
IconRole::Loader => return None,
};