thread_view: Increase click area of the user rules links (#36549)
Release Notes: - N/A
This commit is contained in:
parent
60960409f7
commit
1e1110ee8c
1 changed files with 14 additions and 12 deletions
|
@ -2056,6 +2056,7 @@ impl AcpThreadView {
|
||||||
parent.child(
|
parent.child(
|
||||||
h_flex()
|
h_flex()
|
||||||
.group("user-rules")
|
.group("user-rules")
|
||||||
|
.id("user-rules")
|
||||||
.w_full()
|
.w_full()
|
||||||
.child(
|
.child(
|
||||||
Icon::new(IconName::Reader)
|
Icon::new(IconName::Reader)
|
||||||
|
@ -2078,25 +2079,26 @@ impl AcpThreadView {
|
||||||
.icon_color(Color::Ignored)
|
.icon_color(Color::Ignored)
|
||||||
.visible_on_hover("user-rules")
|
.visible_on_hover("user-rules")
|
||||||
// TODO: Figure out a way to pass focus handle here so we can display the `OpenRulesLibrary` keybinding
|
// TODO: Figure out a way to pass focus handle here so we can display the `OpenRulesLibrary` keybinding
|
||||||
.tooltip(Tooltip::text("View User Rules"))
|
.tooltip(Tooltip::text("View User Rules")),
|
||||||
.on_click(move |_event, window, cx| {
|
)
|
||||||
window.dispatch_action(
|
.on_click(move |_event, window, cx| {
|
||||||
Box::new(OpenRulesLibrary {
|
window.dispatch_action(
|
||||||
prompt_to_select: first_user_rules_id,
|
Box::new(OpenRulesLibrary {
|
||||||
}),
|
prompt_to_select: first_user_rules_id,
|
||||||
cx,
|
|
||||||
)
|
|
||||||
}),
|
}),
|
||||||
),
|
cx,
|
||||||
|
)
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.when_some(rules_file_text, |parent, rules_file_text| {
|
.when_some(rules_file_text, |parent, rules_file_text| {
|
||||||
parent.child(
|
parent.child(
|
||||||
h_flex()
|
h_flex()
|
||||||
.group("project-rules")
|
.group("project-rules")
|
||||||
|
.id("project-rules")
|
||||||
.w_full()
|
.w_full()
|
||||||
.child(
|
.child(
|
||||||
Icon::new(IconName::File)
|
Icon::new(IconName::Reader)
|
||||||
.size(IconSize::XSmall)
|
.size(IconSize::XSmall)
|
||||||
.color(Color::Disabled),
|
.color(Color::Disabled),
|
||||||
)
|
)
|
||||||
|
@ -2113,10 +2115,10 @@ impl AcpThreadView {
|
||||||
.shape(ui::IconButtonShape::Square)
|
.shape(ui::IconButtonShape::Square)
|
||||||
.icon_size(IconSize::XSmall)
|
.icon_size(IconSize::XSmall)
|
||||||
.icon_color(Color::Ignored)
|
.icon_color(Color::Ignored)
|
||||||
.on_click(cx.listener(Self::handle_open_rules))
|
|
||||||
.visible_on_hover("project-rules")
|
.visible_on_hover("project-rules")
|
||||||
.tooltip(Tooltip::text("View Project Rules")),
|
.tooltip(Tooltip::text("View Project Rules")),
|
||||||
),
|
)
|
||||||
|
.on_click(cx.listener(Self::handle_open_rules)),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.into_any(),
|
.into_any(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue