summaryrefslogtreecommitdiffstats
path: root/graphics/src/primitive.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-01-20 13:29:25 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-01-20 13:29:25 +0100
commit25f182f933ea6b7c112c8f9a450a98dc9b9eebdd (patch)
treefdc498d705f033d3c432e6a06b8cd223dfd82633 /graphics/src/primitive.rs
parent4d502012b3e3ed9d9ef80f21078d53d182cdaa1b (diff)
downloadiced-25f182f933ea6b7c112c8f9a450a98dc9b9eebdd.tar.gz
iced-25f182f933ea6b7c112c8f9a450a98dc9b9eebdd.tar.bz2
iced-25f182f933ea6b7c112c8f9a450a98dc9b9eebdd.zip
Introduce `Border` struct analogous to `Shadow`
Diffstat (limited to 'graphics/src/primitive.rs')
-rw-r--r--graphics/src/primitive.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/graphics/src/primitive.rs b/graphics/src/primitive.rs
index a428c31a..aed59e1a 100644
--- a/graphics/src/primitive.rs
+++ b/graphics/src/primitive.rs
@@ -4,7 +4,7 @@ use crate::core::image;
use crate::core::svg;
use crate::core::text;
use crate::core::{
- Background, Color, Font, Pixels, Point, Rectangle, Shadow, Vector,
+ Background, Border, Color, Font, Pixels, Point, Rectangle, Shadow, Vector,
};
use crate::text::editor;
use crate::text::paragraph;
@@ -67,14 +67,10 @@ pub enum Primitive<T> {
bounds: Rectangle,
/// The background of the quad
background: Background,
- /// The border radii of the quad
- border_radius: [f32; 4],
- /// The border width of the quad
- border_width: f32,
- /// The border color of the quad
- border_color: Color,
+ /// The [`Border`] of the quad
+ border: Border,
/// The [`Shadow`] of the quad
- shadow: Option<Shadow>,
+ shadow: Shadow,
},
/// An image primitive
Image {