Skip to content

Commit b394c58

Browse files
committed
style(terminal): 优化侧边栏工具图标
1 parent e48aba6 commit b394c58

7 files changed

Lines changed: 52 additions & 16 deletions

File tree

Lines changed: 7 additions & 6 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 8 additions & 0 deletions
Loading
Lines changed: 7 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading

‎crates/terminal_view/src/sidebar/mod.rs‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -190,25 +190,25 @@ impl SidebarPanel {
190190
pub fn icon_name(&self) -> IconName {
191191
match self {
192192
SidebarPanel::Settings => IconName::Settings,
193-
SidebarPanel::QuickCommand => IconName::SquareTerminal,
194-
SidebarPanel::HistoryCommand => IconName::TerminalColor,
193+
SidebarPanel::QuickCommand => IconName::TerminalQuickCommandColor,
194+
SidebarPanel::HistoryCommand => IconName::TerminalHistoryColor,
195195
SidebarPanel::RichInput => IconName::Edit,
196196
SidebarPanel::AiChat => IconName::AI,
197-
SidebarPanel::FileManager => IconName::FolderOpen,
198-
SidebarPanel::ServerMonitor => IconName::Monitor,
197+
SidebarPanel::FileManager => IconName::TerminalFileManagerColor,
198+
SidebarPanel::ServerMonitor => IconName::TerminalServerMonitorColor,
199199
}
200200
}
201201

202202
/// 获取面板图标
203203
pub fn icon(&self) -> Icon {
204204
match self {
205205
SidebarPanel::Settings => IconName::SettingColor.color(),
206-
SidebarPanel::QuickCommand => IconName::SquareTerminalColor.color(),
207-
SidebarPanel::HistoryCommand => IconName::TerminalColor.color(),
206+
SidebarPanel::QuickCommand => IconName::TerminalQuickCommandColor.color(),
207+
SidebarPanel::HistoryCommand => IconName::TerminalHistoryColor.color(),
208208
SidebarPanel::RichInput => IconName::RichInputColor.color(),
209209
SidebarPanel::AiChat => IconName::AI.color(),
210-
SidebarPanel::FileManager => IconName::FolderOpenColor.color(),
211-
SidebarPanel::ServerMonitor => IconName::Monitor.color(),
210+
SidebarPanel::FileManager => IconName::TerminalFileManagerColor.color(),
211+
SidebarPanel::ServerMonitor => IconName::TerminalServerMonitorColor.color(),
212212
}
213213
}
214214

@@ -1127,7 +1127,7 @@ impl TerminalSidebar {
11271127
}))
11281128
.child(
11291129
Icon::new(panel.icon())
1130-
.with_size(Size::Medium)
1130+
.with_size(Size::Large)
11311131
.text_color(if is_active { accent_fg } else { muted_fg }),
11321132
)
11331133
}
@@ -1292,7 +1292,7 @@ impl TerminalSidebarToolbar {
12921292
})
12931293
.child(
12941294
Icon::new(panel.icon())
1295-
.with_size(Size::Medium)
1295+
.with_size(Size::Large)
12961296
.text_color(if button.open { accent_fg } else { muted_fg }),
12971297
)
12981298
}

‎crates/ui/src/icon.rs‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ pub enum IconName {
8282
FolderClosed,
8383
FolderOpen,
8484
FolderOpenColor,
85+
TerminalFileManagerColor,
8586
Frame,
8687
GalleryVerticalEnd,
8788
ExtensionsColor,
@@ -129,6 +130,7 @@ pub enum IconName {
129130
SortDescending,
130131
SquareTerminal,
131132
SquareTerminalColor,
133+
TerminalQuickCommandColor,
132134
Star,
133135
StarFill,
134136
StarOff,
@@ -173,6 +175,7 @@ pub enum IconName {
173175
Redis,
174176
Terminal,
175177
TerminalColor,
178+
TerminalHistoryColor,
176179
RichInputColor,
177180
Apps,
178181
AppsColor,
@@ -214,6 +217,7 @@ pub enum IconName {
214217
SettingColor,
215218
SerialPort,
216219
Monitor,
220+
TerminalServerMonitorColor,
217221
PortForwardingColor,
218222
Rdp,
219223
Vnc,
@@ -286,6 +290,7 @@ impl IconNamed for IconName {
286290
Self::FolderClosed => "icons/folder-closed.svg",
287291
Self::FolderOpen => "icons/folder-open.svg",
288292
Self::FolderOpenColor => "icons/folder_open_color.svg",
293+
Self::TerminalFileManagerColor => "icons/terminal_file_manager_color.svg",
289294
Self::Frame => "icons/frame.svg",
290295
Self::GalleryVerticalEnd => "icons/gallery-vertical-end.svg",
291296
Self::ExtensionsColor => "icons/extensions_color.svg",
@@ -333,6 +338,7 @@ impl IconNamed for IconName {
333338
Self::SortDescending => "icons/sort-descending.svg",
334339
Self::SquareTerminal => "icons/square-terminal.svg",
335340
Self::SquareTerminalColor => "icons/square_terminal_color.svg",
341+
Self::TerminalQuickCommandColor => "icons/terminal_quick_command_color.svg",
336342
Self::Star => "icons/star.svg",
337343
Self::StarFill => "icons/star-fill.svg",
338344
Self::StarOff => "icons/star-off.svg",
@@ -379,6 +385,7 @@ impl IconNamed for IconName {
379385
Self::Redis => "icons/redis.svg",
380386
Self::Terminal => "icons/terminal.svg",
381387
Self::TerminalColor => "icons/terminal_color.svg",
388+
Self::TerminalHistoryColor => "icons/terminal_history_color.svg",
382389
Self::RichInputColor => "icons/rich_input_color.svg",
383390
Self::Apps => "icons/apps.svg",
384391
Self::AppsColor => "icons/apps_color.svg",
@@ -418,6 +425,7 @@ impl IconNamed for IconName {
418425
Self::SettingColor => "icons/setting_color.svg",
419426
Self::SerialPort => "icons/serial_port.svg",
420427
Self::Monitor => "icons/monitor.svg",
428+
Self::TerminalServerMonitorColor => "icons/terminal_server_monitor_color.svg",
421429
Self::PortForwardingColor => "icons/port_forwarding_color.svg",
422430
Self::Rdp => "icons/rdp.svg",
423431
Self::Vnc => "icons/vnc.svg",

0 commit comments

Comments
 (0)