summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/solar_system/Cargo.toml2
-rw-r--r--examples/solar_system/src/main.rs8
-rw-r--r--native/src/widget/pane_grid/title_bar.rs4
3 files changed, 8 insertions, 6 deletions
diff --git a/examples/solar_system/Cargo.toml b/examples/solar_system/Cargo.toml
index 44ced729..327fe0aa 100644
--- a/examples/solar_system/Cargo.toml
+++ b/examples/solar_system/Cargo.toml
@@ -7,4 +7,4 @@ publish = false
[dependencies]
iced = { path = "../..", features = ["canvas", "tokio", "debug"] }
-rand = "0.7"
+rand = "0.8.3"
diff --git a/examples/solar_system/src/main.rs b/examples/solar_system/src/main.rs
index 6a2de736..c8f74978 100644
--- a/examples/solar_system/src/main.rs
+++ b/examples/solar_system/src/main.rs
@@ -117,15 +117,13 @@ impl State {
(
Point::new(
rng.gen_range(
- -(width as f32) / 2.0,
- width as f32 / 2.0,
+ (-(width as f32) / 2.0)..(width as f32 / 2.0),
),
rng.gen_range(
- -(height as f32) / 2.0,
- height as f32 / 2.0,
+ (-(height as f32) / 2.0)..(height as f32 / 2.0),
),
),
- rng.gen_range(0.5, 1.0),
+ rng.gen_range(0.5..1.0),
)
})
.collect()
diff --git a/native/src/widget/pane_grid/title_bar.rs b/native/src/widget/pane_grid/title_bar.rs
index 9fbd2797..c8eaeb3f 100644
--- a/native/src/widget/pane_grid/title_bar.rs
+++ b/native/src/widget/pane_grid/title_bar.rs
@@ -149,6 +149,10 @@ where
self.content.hash_layout(hasher);
self.padding.hash(hasher);
+
+ if let Some(controls) = &self.controls {
+ controls.hash_layout(hasher);
+ }
}
pub(crate) fn layout(