From f9e625575d61dd93634ba618cf7855c84a14933a Mon Sep 17 00:00:00 2001 From: genusistimelord Date: Fri, 11 Aug 2023 13:32:21 -0400 Subject: [PATCH 1/3] changed the way contains works to exclude <= for point.y and point.x on width and height check to avoid multiple selects --- core/src/rectangle.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/rectangle.rs b/core/src/rectangle.rs index db56aa18cf..c1c2eeac3c 100644 --- a/core/src/rectangle.rs +++ b/core/src/rectangle.rs @@ -74,9 +74,9 @@ impl Rectangle { /// Returns true if the given [`Point`] is contained in the [`Rectangle`]. pub fn contains(&self, point: Point) -> bool { self.x <= point.x - && point.x <= self.x + self.width + && point.x < self.x + self.width && self.y <= point.y - && point.y <= self.y + self.height + && point.y < self.y + self.height } /// Returns true if the current [`Rectangle`] is completely within the given From 4edad468795a6434f49ee6fec5410881ea90503d Mon Sep 17 00:00:00 2001 From: genusistimelord Date: Fri, 11 Aug 2023 13:38:41 -0400 Subject: [PATCH 2/3] update changelog --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6a87c1a1d..41ca18ec28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed +- bounds contains issue where widgets 0.0 pixels next to each other would both be active. + +Many thanks to... + +- @genusistimelord + ## [0.10.0] - 2023-07-28 ### Added - Text shaping, font fallback, and `iced_wgpu` overhaul. [#1697](https://github.com/iced-rs/iced/pull/1697) From 64bf9e081e5bfdb4a86c640b09afa63db4180ab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Tue, 15 Aug 2023 07:45:48 +0200 Subject: [PATCH 3/3] Update `CHANGELOG` --- CHANGELOG.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41ca18ec28..5d9c734969 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,13 +6,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -### Fixed -- bounds contains issue where widgets 0.0 pixels next to each other would both be active. - -Many thanks to... - -- @genusistimelord - ## [0.10.0] - 2023-07-28 ### Added - Text shaping, font fallback, and `iced_wgpu` overhaul. [#1697](https://github.com/iced-rs/iced/pull/1697) @@ -93,6 +86,7 @@ Many thanks to... - `image::Viewer` reacting to any scroll event. [#1998](https://github.com/iced-rs/iced/pull/1998) - `TextInput` pasting text when `Alt` key is pressed. [#2006](https://github.com/iced-rs/iced/pull/2006) - Broken link to old `iced_native` crate in `README`. [#2024](https://github.com/iced-rs/iced/pull/2024) +- `Rectangle::contains` being non-exclusive. [#2017](https://github.com/iced-rs/iced/pull/2017) Many thanks to... @@ -105,6 +99,7 @@ Many thanks to... - @clarkmoody - @Davidster - @Drakulix +- @genusistimelord - @GyulyVGC - @ids1024 - @jhff