chore: fixing linter warnings
This commit is contained in:
parent
ebcfa5f2d0
commit
8e99406a8b
17 changed files with 79 additions and 75 deletions
|
|
@ -423,14 +423,14 @@ impl<'a, S: AsRef<str>, Message> Widget<Message, crate::Renderer> for List<'a, S
|
|||
|
||||
let bounds = Rectangle {
|
||||
x: bounds.x,
|
||||
y: bounds.y + (option_height * i as f32),
|
||||
y: option_height.mul_add(i as f32, bounds.y),
|
||||
width: bounds.width,
|
||||
height: option_height,
|
||||
};
|
||||
|
||||
let (color, font) = if self.selected_option == Some(i) {
|
||||
let item_x = bounds.x + appearance.border_width;
|
||||
let item_width = bounds.width - appearance.border_width * 2.0;
|
||||
let item_width = appearance.border_width.mul_add(-2.0, bounds.width);
|
||||
|
||||
renderer.fill_quad(
|
||||
renderer::Quad {
|
||||
|
|
@ -463,7 +463,7 @@ impl<'a, S: AsRef<str>, Message> Widget<Message, crate::Renderer> for List<'a, S
|
|||
(appearance.selected_text_color, crate::font::FONT_SEMIBOLD)
|
||||
} else if *self.hovered_option == Some(i) {
|
||||
let item_x = bounds.x + appearance.border_width;
|
||||
let item_width = bounds.width - appearance.border_width * 2.0;
|
||||
let item_width = appearance.border_width.mul_add(-2.0, bounds.width);
|
||||
|
||||
renderer.fill_quad(
|
||||
renderer::Quad {
|
||||
|
|
|
|||
|
|
@ -173,7 +173,6 @@ impl<'a, S: AsRef<str>, Message: 'a> Widget<Message, crate::Renderer> for Dropdo
|
|||
self.gap,
|
||||
self.padding,
|
||||
self.text_size.unwrap_or(14.0),
|
||||
self.font,
|
||||
self.selections,
|
||||
self.selected,
|
||||
&self.on_selected,
|
||||
|
|
@ -359,7 +358,6 @@ pub fn overlay<'a, S: AsRef<str>, Message: 'a>(
|
|||
gap: f32,
|
||||
padding: Padding,
|
||||
text_size: f32,
|
||||
font: Option<crate::font::Font>,
|
||||
selections: &'a [S],
|
||||
selected_option: Option<usize>,
|
||||
on_selected: &'a dyn Fn(usize) -> Message,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue