From c49bce9de60651bf601c56a826c40a12cf9c8f5f Mon Sep 17 00:00:00 2001 From: Leigh Date: Mon, 8 Sep 2025 18:52:47 +0100 Subject: [PATCH 1/5] Fix typo in documentation comment for filter_map --- futures/src/subscription.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/futures/src/subscription.rs b/futures/src/subscription.rs index 338b2622..2afaaae9 100644 --- a/futures/src/subscription.rs +++ b/futures/src/subscription.rs @@ -426,7 +426,7 @@ where } } -/// Creatges a [`Subscription`] from a hashable id and a filter function. +/// Creates a [`Subscription`] from a hashable id and a filter function. pub fn filter_map(id: I, f: F) -> Subscription where I: Hash + 'static, From f9de884655997aed2935abfde894855053d6588b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Thu, 11 Sep 2025 20:16:16 +0200 Subject: [PATCH 2/5] Enable advanced shaping for text in `iced` widget helper --- widget/src/helpers.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/widget/src/helpers.rs b/widget/src/helpers.rs index 9e510685..e34bcebc 100644 --- a/widget/src/helpers.rs +++ b/widget/src/helpers.rs @@ -1921,7 +1921,10 @@ where row![ svg(LOGO.clone()).width(text_size * 1.3), - text("iced").size(text_size).font(Font::MONOSPACE) + text("iced") + .size(text_size) + .font(Font::MONOSPACE) + .shaping(text::Shaping::Advanced) ] .spacing(text_size.0 / 3.0) .align_y(Alignment::Center) From 4cd35f74628d2d05c07af6b2ccf8b86a09466274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Fri, 12 Sep 2025 20:06:59 +0200 Subject: [PATCH 3/5] Invalidate `tooltip` layout on `mouse` events --- widget/src/tooltip.rs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/widget/src/tooltip.rs b/widget/src/tooltip.rs index 3f81270f..900585fa 100644 --- a/widget/src/tooltip.rs +++ b/widget/src/tooltip.rs @@ -202,23 +202,23 @@ where shell: &mut Shell<'_, Message>, viewport: &Rectangle, ) { - let state = tree.state.downcast_mut::(); + if let Event::Mouse(_) = event { + let state = tree.state.downcast_mut::(); + let was_idle = *state == State::Idle; - let previous_state = *state; - let was_idle = *state == State::Idle; + *state = cursor + .position_over(layout.bounds()) + .map(|cursor_position| State::Hovered { cursor_position }) + .unwrap_or_default(); - *state = cursor - .position_over(layout.bounds()) - .map(|cursor_position| State::Hovered { cursor_position }) - .unwrap_or_default(); + let is_idle = *state == State::Idle; - let is_idle = *state == State::Idle; - - if was_idle != is_idle - || (self.position == Position::FollowCursor - && previous_state != *state) - { - shell.request_redraw(); + if was_idle != is_idle { + shell.invalidate_layout(); + shell.request_redraw(); + } else if self.position == Position::FollowCursor { + shell.request_redraw(); + } } self.content.as_widget_mut().update( From b6f3057fae69b491004277dc6c0428d67434a921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Mon, 15 Sep 2025 23:54:24 +0200 Subject: [PATCH 4/5] Update `winit` to fix `debug` build on macOS Tahoe --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fad67bc7..bb86bc41 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1297,7 +1297,7 @@ dependencies = [ [[package]] name = "dpi" version = "0.1.1" -source = "git+https://github.com/iced-rs/winit.git?rev=11414b6aa45699f038114e61b4ddf5102b2d3b4b#11414b6aa45699f038114e61b4ddf5102b2d3b4b" +source = "git+https://github.com/iced-rs/winit.git?rev=05b8ff17a06562f0a10bb46e6eaacbe2a95cb5ed#05b8ff17a06562f0a10bb46e6eaacbe2a95cb5ed" [[package]] name = "drm" @@ -7580,7 +7580,7 @@ checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" [[package]] name = "winit" version = "0.30.8" -source = "git+https://github.com/iced-rs/winit.git?rev=11414b6aa45699f038114e61b4ddf5102b2d3b4b#11414b6aa45699f038114e61b4ddf5102b2d3b4b" +source = "git+https://github.com/iced-rs/winit.git?rev=05b8ff17a06562f0a10bb46e6eaacbe2a95cb5ed#05b8ff17a06562f0a10bb46e6eaacbe2a95cb5ed" dependencies = [ "ahash", "android-activity", diff --git a/Cargo.toml b/Cargo.toml index a92f7778..978f73e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -217,7 +217,7 @@ web-sys = "0.3.69" web-time = "1.1" wgpu = "26.0" window_clipboard = "0.4.1" -winit = { git = "https://github.com/iced-rs/winit.git", rev = "11414b6aa45699f038114e61b4ddf5102b2d3b4b" } +winit = { git = "https://github.com/iced-rs/winit.git", rev = "05b8ff17a06562f0a10bb46e6eaacbe2a95cb5ed" } [workspace.lints.rust] rust_2018_idioms = { level = "deny", priority = -1 } From db5a1f6353b9f8520c4f9633d1cdc90242c2afe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Fri, 19 Sep 2025 18:22:45 +0200 Subject: [PATCH 5/5] Fix `clippy` lints for Rust 1.90 --- core/src/window/icon.rs | 2 +- wgpu/src/lib.rs | 2 +- widget/src/text_editor.rs | 3 +-- widget/src/text_input.rs | 3 +-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/core/src/window/icon.rs b/core/src/window/icon.rs index fb34ca32..fe4a7083 100644 --- a/core/src/window/icon.rs +++ b/core/src/window/icon.rs @@ -11,7 +11,7 @@ pub fn from_rgba( ) -> Result { const PIXEL_SIZE: usize = mem::size_of::() * 4; - if rgba.len() % PIXEL_SIZE != 0 { + if !rgba.len().is_multiple_of(PIXEL_SIZE) { return Err(Error::ByteCountNotDivisibleBy4 { byte_count: rgba.len(), }); diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index 3d8ee265..f31457a7 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -797,7 +797,7 @@ impl graphics::mesh::Renderer for Renderer { ); debug_assert!( - mesh.indices().len() % 3 == 0, + mesh.indices().len().is_multiple_of(3), "Mesh indices length must be a multiple of 3" ); diff --git a/widget/src/text_editor.rs b/widget/src/text_editor.rs index 33666935..45622257 100644 --- a/widget/src/text_editor.rs +++ b/widget/src/text_editor.rs @@ -535,8 +535,7 @@ impl Focus { self.is_window_focused && ((self.now - self.updated_at).as_millis() / Self::CURSOR_BLINK_INTERVAL_MILLIS) - % 2 - == 0 + .is_multiple_of(2) } } diff --git a/widget/src/text_input.rs b/widget/src/text_input.rs index c385b34b..4cdd1d2d 100644 --- a/widget/src/text_input.rs +++ b/widget/src/text_input.rs @@ -515,8 +515,7 @@ where let is_cursor_visible = !is_disabled && ((focus.now - focus.updated_at).as_millis() / CURSOR_BLINK_INTERVAL_MILLIS) - % 2 - == 0; + .is_multiple_of(2); let cursor = if is_cursor_visible { Some((