Skip to content

Commit

Permalink
add debug icon
Browse files Browse the repository at this point in the history
  • Loading branch information
d1y committed Jun 25, 2024
1 parent 331625e commit d9e09c4
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 6 deletions.
1 change: 1 addition & 0 deletions assets/icons/debug-continue.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/debug-restart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/debug-step-into.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/debug-step-out.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/debug-step-over.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/debug-stop.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions crates/debugger_ui/src/debugger_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ impl Render for DebugPanel {
.p_2()
.gap_2()
.child(
IconButton::new("debug-continue", IconName::Play)
IconButton::new("debug-continue", IconName::DebugContinue)
.on_click(cx.listener(|view, _, cx| {
let client = view.debug_adapter(cx);
if let Some(thread_id) = view.thread_id {
Expand All @@ -190,11 +190,11 @@ impl Render for DebugPanel {
.tooltip(move |cx| Tooltip::text("Continue debug", cx)),
)
.child(
IconButton::new("debug-step-over", IconName::Play)
IconButton::new("debug-step-over", IconName::DebugStepOver)
.tooltip(move |cx| Tooltip::text("Step over", cx)),
)
.child(
IconButton::new("debug-go-in", IconName::Play)
IconButton::new("debug-go-in", IconName::DebugStepInto)
.on_click(cx.listener(|view, _, cx| {
let client = view.debug_adapter(cx);

Expand All @@ -207,7 +207,7 @@ impl Render for DebugPanel {
.tooltip(move |cx| Tooltip::text("Go in", cx)),
)
.child(
IconButton::new("debug-go-out", IconName::Play)
IconButton::new("debug-go-out", IconName::DebugStepOut)
.on_click(cx.listener(|view, _, cx| {
let client = view.debug_adapter(cx);
if let Some(thread_id) = view.thread_id {
Expand All @@ -219,11 +219,11 @@ impl Render for DebugPanel {
.tooltip(move |cx| Tooltip::text("Go out", cx)),
)
.child(
IconButton::new("debug-restart", IconName::Play)
IconButton::new("debug-restart", IconName::DebugRestart)
.tooltip(move |cx| Tooltip::text("Restart", cx)),
)
.child(
IconButton::new("debug-stop", IconName::Play)
IconButton::new("debug-stop", IconName::DebugStop)
.tooltip(move |cx| Tooltip::text("Stop", cx)),
),
)
Expand Down
12 changes: 12 additions & 0 deletions crates/ui/src/components/icon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ pub enum IconName {
Copy,
CountdownTimer,
Dash,
DebugContinue,
DebugStepOver,
DebugStepInto,
DebugStepOut,
DebugRestart,
DebugStop,
Delete,
Disconnected,
Download,
Expand Down Expand Up @@ -250,6 +256,12 @@ impl IconName {
IconName::Copy => "icons/copy.svg",
IconName::CountdownTimer => "icons/countdown_timer.svg",
IconName::Dash => "icons/dash.svg",
IconName::DebugContinue => "icons/debug-continue.svg",
IconName::DebugStepOver => "icons/debug-step-over.svg",
IconName::DebugStepInto => "icons/debug-step-into.svg",
IconName::DebugStepOut => "icons/debug-step-out.svg",
IconName::DebugRestart => "icons/debug-restart.svg",
IconName::DebugStop => "icons/debug-stop.svg",
IconName::Delete => "icons/delete.svg",
IconName::Disconnected => "icons/disconnected.svg",
IconName::Download => "icons/download.svg",
Expand Down

0 comments on commit d9e09c4

Please sign in to comment.