add app layout shell to the layout crate
This commit is contained in:
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M9 3v18"/></svg>
|
||||
|
After Width: | Height: | Size: 256 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M15 3v18"/></svg>
|
||||
|
After Width: | Height: | Size: 257 B |
@@ -29,6 +29,8 @@ pub enum IconRole {
|
||||
Info,
|
||||
Eye,
|
||||
EyeOff,
|
||||
PanelLeft,
|
||||
PanelRight,
|
||||
}
|
||||
|
||||
impl IconRole {
|
||||
@@ -48,6 +50,8 @@ impl IconRole {
|
||||
Self::Info,
|
||||
Self::Eye,
|
||||
Self::EyeOff,
|
||||
Self::PanelLeft,
|
||||
Self::PanelRight,
|
||||
]
|
||||
}
|
||||
|
||||
@@ -67,6 +71,8 @@ impl IconRole {
|
||||
Self::Info => "icons/info.svg",
|
||||
Self::Eye => "icons/eye.svg",
|
||||
Self::EyeOff => "icons/eye-off.svg",
|
||||
Self::PanelLeft => "icons/panel-left.svg",
|
||||
Self::PanelRight => "icons/panel-right.svg",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,6 +92,8 @@ impl IconRole {
|
||||
Self::Info => "info",
|
||||
Self::Eye => "eye",
|
||||
Self::EyeOff => "eye-off",
|
||||
Self::PanelLeft => "panel-left",
|
||||
Self::PanelRight => "panel-right",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,6 +152,19 @@ impl IconRole {
|
||||
"visibility-off",
|
||||
"eye-off",
|
||||
],
|
||||
Self::PanelLeft => &[
|
||||
"sidebar-expand-left",
|
||||
"sidebar-show-symbolic",
|
||||
"panel-left",
|
||||
"sidebar-left",
|
||||
],
|
||||
Self::PanelRight => &[
|
||||
"sidebar-expand-right",
|
||||
"sidebar-show-right-symbolic",
|
||||
"sidebar-show-symbolic",
|
||||
"panel-right",
|
||||
"sidebar-right",
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -254,6 +275,8 @@ fn asset_bytes(path: &str) -> Option<&'static [u8]> {
|
||||
"icons/info.svg" => Some(include_bytes!("../assets/info.svg")),
|
||||
"icons/eye.svg" => Some(include_bytes!("../assets/eye.svg")),
|
||||
"icons/eye-off.svg" => Some(include_bytes!("../assets/eye-off.svg")),
|
||||
"icons/panel-left.svg" => Some(include_bytes!("../assets/panel-left.svg")),
|
||||
"icons/panel-right.svg" => Some(include_bytes!("../assets/panel-right.svg")),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,8 @@ pub(crate) fn glyph(role: IconRole) -> Option<char> {
|
||||
IconRole::Info => 0xE946, // Info
|
||||
IconRole::Eye => 0xE7B3, // RedEye
|
||||
IconRole::EyeOff => 0xED1A, // Hide
|
||||
IconRole::PanelLeft => 0xE90C, // DockLeft
|
||||
IconRole::PanelRight => 0xE90D, // DockRight
|
||||
};
|
||||
char::from_u32(codepoint)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user