Buttons should always use cursor_pointer
This commit is contained in:
parent
c2d6d24952
commit
3d8e63b93b
2 changed files with 6 additions and 6 deletions
|
@ -178,6 +178,7 @@ impl<V: 'static> Button<V> {
|
||||||
.text_ui()
|
.text_ui()
|
||||||
.rounded_md()
|
.rounded_md()
|
||||||
.bg(self.variant.bg_color(cx))
|
.bg(self.variant.bg_color(cx))
|
||||||
|
.cursor_pointer()
|
||||||
.hover(|style| style.bg(self.variant.bg_color_hover(cx)))
|
.hover(|style| style.bg(self.variant.bg_color_hover(cx)))
|
||||||
.active(|style| style.bg(self.variant.bg_color_active(cx)));
|
.active(|style| style.bg(self.variant.bg_color_active(cx)));
|
||||||
|
|
||||||
|
|
|
@ -95,17 +95,16 @@ impl<V: 'static> IconButton<V> {
|
||||||
.rounded_md()
|
.rounded_md()
|
||||||
.p_1()
|
.p_1()
|
||||||
.bg(bg_color)
|
.bg(bg_color)
|
||||||
|
.cursor_pointer()
|
||||||
.hover(|style| style.bg(bg_hover_color))
|
.hover(|style| style.bg(bg_hover_color))
|
||||||
.active(|style| style.bg(bg_active_color))
|
.active(|style| style.bg(bg_active_color))
|
||||||
.child(IconElement::new(self.icon).color(icon_color));
|
.child(IconElement::new(self.icon).color(icon_color));
|
||||||
|
|
||||||
if let Some(click_handler) = self.handlers.click.clone() {
|
if let Some(click_handler) = self.handlers.click.clone() {
|
||||||
button = button
|
button = button.on_mouse_down(MouseButton::Left, move |state, event, cx| {
|
||||||
.on_mouse_down(MouseButton::Left, move |state, event, cx| {
|
cx.stop_propagation();
|
||||||
cx.stop_propagation();
|
click_handler(state, cx);
|
||||||
click_handler(state, cx);
|
})
|
||||||
})
|
|
||||||
.cursor_pointer();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(tooltip) = self.tooltip.take() {
|
if let Some(tooltip) = self.tooltip.take() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue