summaryrefslogtreecommitdiffstats
path: root/examples/custom_quad/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/custom_quad/src/main.rs')
-rw-r--r--examples/custom_quad/src/main.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/examples/custom_quad/src/main.rs b/examples/custom_quad/src/main.rs
index e3f110bb..14f62caa 100644
--- a/examples/custom_quad/src/main.rs
+++ b/examples/custom_quad/src/main.rs
@@ -3,8 +3,8 @@ mod quad {
use iced::advanced::layout::{self, Layout};
use iced::advanced::renderer;
use iced::advanced::widget::{self, Widget};
- use iced::{mouse, Shadow};
- use iced::{Color, Element, Length, Rectangle, Size};
+ use iced::mouse;
+ use iced::{Border, Color, Element, Length, Rectangle, Shadow, Size};
pub struct CustomQuad {
size: f32,
@@ -62,10 +62,12 @@ mod quad {
renderer.fill_quad(
renderer::Quad {
bounds: layout.bounds(),
- border_radius: self.radius.into(),
- border_width: self.border_width,
- border_color: Color::from_rgb(1.0, 0.0, 0.0),
- shadow: Some(self.shadow),
+ border: Border {
+ radius: self.radius.into(),
+ width: self.border_width,
+ color: Color::from_rgb(1.0, 0.0, 0.0),
+ },
+ shadow: self.shadow,
},
Color::BLACK,
);