Use Default implementation of renderer::Quad

This commit is contained in:
Héctor Ramón Jiménez 2024-01-20 12:25:07 +01:00
parent b7b457a575
commit 370b2f6df7
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
20 changed files with 63 additions and 116 deletions

View file

@ -10,8 +10,7 @@ use crate::core::text::highlighter::{self, Highlighter};
use crate::core::text::{self, LineHeight};
use crate::core::widget::{self, Widget};
use crate::core::{
Clipboard, Color, Element, Length, Padding, Pixels, Rectangle, Shell, Size,
Vector,
Clipboard, Element, Length, Padding, Pixels, Rectangle, Shell, Size, Vector,
};
use std::cell::RefCell;
@ -470,7 +469,7 @@ where
border_radius: appearance.border_radius,
border_width: appearance.border_width,
border_color: appearance.border_color,
shadow: Default::default(),
..renderer::Quad::default()
},
appearance.background,
);
@ -509,10 +508,7 @@ where
)
.into(),
},
border_radius: 0.0.into(),
border_width: 0.0,
border_color: Color::TRANSPARENT,
shadow: Default::default(),
..renderer::Quad::default()
},
theme.value_color(&self.style),
);
@ -525,10 +521,7 @@ where
renderer.fill_quad(
renderer::Quad {
bounds: range,
border_radius: 0.0.into(),
border_width: 0.0,
border_color: Color::TRANSPARENT,
shadow: Default::default(),
..renderer::Quad::default()
},
theme.selection_color(&self.style),
);