change some panel icons

This commit is contained in:
Dongdong Zhou 2024-08-12 22:22:15 +01:00
parent 0bbb901a3b
commit 8efe4bbdef
5 changed files with 18 additions and 14 deletions

View File

@ -36,6 +36,7 @@ name = "Lapce Codicons"
"keyboard" = "keyboard.svg"
"breadcrumb_separator" = "chevron-right.svg"
"symbol_color" = "symbol-color.svg"
"type_hierarchy" = "type-hierarchy.svg"
"window.close" = "chrome-close.svg"
"window.restore" = "chrome-restore.svg"
@ -103,6 +104,7 @@ name = "Lapce Codicons"
"search.replace" = "replace.svg"
"search.replace_all" = "replace-all.svg"
"document_symbol" = "symbol-class.svg"
"symbol_kind.array" = "symbol-array.svg"
"symbol_kind.boolean" = "symbol-boolean.svg"
"symbol_kind.class" = "symbol-class.svg"

View File

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M13.5 12h-1.793L10 10.293V6.5L9.5 6H8V4h.5l.5-.5v-2L8.5 1h-2l-.5.5v2l.5.5H7v2H5.5l-.5.5v3.793L3.293 12H1.5l-.5.5v2l.5.5h2l.5-.5v-1.793L5.707 11h3.586L11 12.707V14.5l.5.5h2l.5-.5v-2l-.5-.5zM7 2h1v1H7V2zM6 7h3v3H6V7zm-3 7H2v-1h1v1zm10 0h-1v-1h1v1z"/></svg>

After

Width:  |  Height:  |  Size: 366 B

View File

@ -38,6 +38,7 @@ impl LapceIcons {
pub const KEYBOARD: &'static str = "keyboard";
pub const BREADCRUMB_SEPARATOR: &'static str = "breadcrumb_separator";
pub const SYMBOL_COLOR: &'static str = "symbol_color";
pub const TYPE_HIERARCHY: &'static str = "type_hierarchy";
pub const FILE: &'static str = "file";
pub const FILE_EXPLORER: &'static str = "file_explorer";
@ -108,6 +109,7 @@ impl LapceIcons {
pub const FILE_TYPE_SYMLINK_FILE: &'static str = "file-symlink-file";
pub const FILE_TYPE_SYMLINK_DIRECTORY: &'static str = "file-symlink-directory";
pub const DOCUMENT_SYMBOL: &'static str = "document_symbol";
pub const SYMBOL_KIND_ARRAY: &'static str = "symbol_kind.array";
pub const SYMBOL_KIND_BOOLEAN: &'static str = "symbol_kind.boolean";
pub const SYMBOL_KIND_CLASS: &'static str = "symbol_kind.class";

View File

@ -29,8 +29,8 @@ pub fn svg_name(&self) -> &'static str {
PanelKind::Search => LapceIcons::SEARCH,
PanelKind::Problem => LapceIcons::PROBLEM,
PanelKind::Debug => LapceIcons::DEBUG,
PanelKind::CallHierarchy => LapceIcons::LINK,
PanelKind::DocumentSymbol => LapceIcons::SEARCH,
PanelKind::CallHierarchy => LapceIcons::TYPE_HIERARCHY,
PanelKind::DocumentSymbol => LapceIcons::DOCUMENT_SYMBOL,
}
}

View File

@ -538,19 +538,18 @@ fn panel_picker(
|p| *p,
move |p| {
let window_tab_data = window_tab_data.clone();
let (icon, tooltip) = match p {
PanelKind::Terminal => (LapceIcons::TERMINAL, "Terminal"),
PanelKind::FileExplorer => {
(LapceIcons::FILE_EXPLORER, "File Explorer")
}
PanelKind::SourceControl => (LapceIcons::SCM, "Source Control"),
PanelKind::Plugin => (LapceIcons::EXTENSIONS, "Plugins"),
PanelKind::Search => (LapceIcons::SEARCH, "Search"),
PanelKind::Problem => (LapceIcons::PROBLEM, "Problems"),
PanelKind::Debug => (LapceIcons::DEBUG_ALT, "Debug"),
PanelKind::CallHierarchy => (LapceIcons::LINK, "Call Hierarchy"),
PanelKind::DocumentSymbol => (LapceIcons::SEARCH, "Document Symbol"),
let tooltip = match p {
PanelKind::Terminal => "Terminal",
PanelKind::FileExplorer => "File Explorer",
PanelKind::SourceControl => "Source Control",
PanelKind::Plugin => "Plugins",
PanelKind::Search => "Search",
PanelKind::Problem => "Problems",
PanelKind::Debug => "Debug",
PanelKind::CallHierarchy => "Call Hierarchy",
PanelKind::DocumentSymbol => "Document Symbol",
};
let icon = p.svg_name();
let is_active = {
let window_tab_data = window_tab_data.clone();
move || {