ui2: Unsuppress and fix warnings (#3423)

This PR unsupresses the warnings in `ui2` and summarily fixes them.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2023-11-28 14:44:19 -05:00 committed by GitHub
parent 874fde09ab
commit 070674a4fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 46 additions and 93 deletions

View file

@ -23,15 +23,13 @@ impl RenderOnce for IconButton {
_ => self.color,
};
let (mut bg_color, bg_hover_color, bg_active_color) = match self.variant {
let (mut bg_color, bg_active_color) = match self.variant {
ButtonVariant::Filled => (
cx.theme().colors().element_background,
cx.theme().colors().element_hover,
cx.theme().colors().element_active,
),
ButtonVariant::Ghost => (
cx.theme().colors().ghost_element_background,
cx.theme().colors().ghost_element_hover,
cx.theme().colors().ghost_element_active,
),
};
@ -124,6 +122,6 @@ impl IconButton {
}
pub fn action(self, action: Box<dyn Action>) -> Self {
self.on_click(move |this, cx| cx.dispatch_action(action.boxed_clone()))
self.on_click(move |_event, cx| cx.dispatch_action(action.boxed_clone()))
}
}