diff options
author | 2019-09-03 13:56:43 +0200 | |
---|---|---|
committer | 2019-09-03 13:56:43 +0200 | |
commit | 5c5612d9319cf9347e26891b15507efee30ad1b3 (patch) | |
tree | 1ba8a50a4a1a9b52c12d72da58bccb3a52f705be /src/rectangle.rs | |
parent | b08c999ac8346bfbe9d95d64c05c511a13baf895 (diff) | |
download | iced-5c5612d9319cf9347e26891b15507efee30ad1b3.tar.gz iced-5c5612d9319cf9347e26891b15507efee30ad1b3.tar.bz2 iced-5c5612d9319cf9347e26891b15507efee30ad1b3.zip |
Apply latest changes to `Image` and `ProgressBar`
Diffstat (limited to 'src/rectangle.rs')
-rw-r--r-- | src/rectangle.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/rectangle.rs b/src/rectangle.rs index 9f2a1350..95c2570c 100644 --- a/src/rectangle.rs +++ b/src/rectangle.rs @@ -1,22 +1,22 @@ use crate::Point; /// A rectangle. -#[derive(Debug, PartialEq, Copy, Clone)] -pub struct Rectangle { +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub struct Rectangle<T = f32> { /// X coordinate of the top-left corner. - pub x: f32, + pub x: T, /// Y coordinate of the top-left corner. - pub y: f32, + pub y: T, /// Width of the rectangle. - pub width: f32, + pub width: T, /// Height of the rectangle. - pub height: f32, + pub height: T, } -impl Rectangle { +impl Rectangle<f32> { /// Returns true if the given [`Point`] is contained in the [`Rectangle`]. /// /// [`Point`]: struct.Point.html |