debugger: Make the remove button easier to click for breakpoint list entries (#32772)
Closes #31574 Move this button a bit to the left so it doesn't get blocked by the hitbox of the scrollbar. Also makes the list entries a bit thicker vertically so that the button can be `XSmall` instead of `Indicator`-sized again. Release Notes: - Debugger Beta: fixed a layout issue that made it hard to click the remove (`X`) button for entries in the breakpoint list.
This commit is contained in:
parent
22a2ff4f12
commit
7fb8ae0024
1 changed files with 36 additions and 32 deletions
|
@ -506,44 +506,48 @@ impl LineBreakpoint {
|
||||||
cx.stop_propagation();
|
cx.stop_propagation();
|
||||||
})
|
})
|
||||||
.end_hover_slot(
|
.end_hover_slot(
|
||||||
IconButton::new(
|
h_flex()
|
||||||
SharedString::from(format!(
|
.child(
|
||||||
"breakpoint-ui-on-click-go-to-line-remove-{:?}/{}:{}",
|
IconButton::new(
|
||||||
self.dir, self.name, self.line
|
SharedString::from(format!(
|
||||||
)),
|
"breakpoint-ui-on-click-go-to-line-remove-{:?}/{}:{}",
|
||||||
IconName::Close,
|
self.dir, self.name, self.line
|
||||||
)
|
)),
|
||||||
.on_click({
|
IconName::Close,
|
||||||
let weak = weak.clone();
|
)
|
||||||
let path = path.clone();
|
.on_click({
|
||||||
move |_, _, cx| {
|
let weak = weak.clone();
|
||||||
weak.update(cx, |breakpoint_list, cx| {
|
let path = path.clone();
|
||||||
breakpoint_list.edit_line_breakpoint(
|
move |_, _, cx| {
|
||||||
path.clone(),
|
weak.update(cx, |breakpoint_list, cx| {
|
||||||
row,
|
breakpoint_list.edit_line_breakpoint(
|
||||||
BreakpointEditAction::Toggle,
|
path.clone(),
|
||||||
cx,
|
row,
|
||||||
);
|
BreakpointEditAction::Toggle,
|
||||||
|
cx,
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.ok();
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.ok();
|
.tooltip(move |window, cx| {
|
||||||
}
|
Tooltip::for_action_in(
|
||||||
})
|
"Unset Breakpoint",
|
||||||
.tooltip(move |window, cx| {
|
&UnsetBreakpoint,
|
||||||
Tooltip::for_action_in(
|
&focus_handle,
|
||||||
"Unset Breakpoint",
|
window,
|
||||||
&UnsetBreakpoint,
|
cx,
|
||||||
&focus_handle,
|
)
|
||||||
window,
|
})
|
||||||
cx,
|
.icon_size(ui::IconSize::XSmall),
|
||||||
)
|
)
|
||||||
})
|
.right_4(),
|
||||||
.icon_size(ui::IconSize::Indicator),
|
|
||||||
)
|
)
|
||||||
.child(
|
.child(
|
||||||
v_flex()
|
v_flex()
|
||||||
.py_1()
|
.py_1()
|
||||||
.gap_1()
|
.gap_1()
|
||||||
.min_h(px(22.))
|
.min_h(px(26.))
|
||||||
.justify_center()
|
.justify_center()
|
||||||
.id(SharedString::from(format!(
|
.id(SharedString::from(format!(
|
||||||
"breakpoint-ui-on-click-go-to-line-{:?}/{}:{}",
|
"breakpoint-ui-on-click-go-to-line-{:?}/{}:{}",
|
||||||
|
@ -650,7 +654,7 @@ impl ExceptionBreakpoint {
|
||||||
v_flex()
|
v_flex()
|
||||||
.py_1()
|
.py_1()
|
||||||
.gap_1()
|
.gap_1()
|
||||||
.min_h(px(22.))
|
.min_h(px(26.))
|
||||||
.justify_center()
|
.justify_center()
|
||||||
.id(("exception-breakpoint-label", ix))
|
.id(("exception-breakpoint-label", ix))
|
||||||
.child(
|
.child(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue