From afd0f82f91f178ac2df2989a680f04ad24298eef Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sat, 31 Oct 2026 12:43:21 -0700 Subject: [PATCH] style(mac-bar): spell the stroke widths 1.0_f32 (float_literal_f32_fallback) Six literals in the macOS bar (applications.rs, komorebi.rs x3, komorebi_layout.rs, time.rs) passed 1.0 to egui's Stroke::new, which rustc 1.99 reports as an f32 fallback (a future hard error). The Windows bar and komorebi-bar-core already say 1.0_f32 for the same calls, so this makes the macOS bar text match them; the value is the same f32. No behaviour change. Verified: fake-CC cargo clippy --locked --target aarch64-apple-darwin --workspace --all-targets -D warnings: clean (whole workspace). The Windows bar and komorebi-bar-core are untouched. Verified on the Mini: not yet. --- komorebi-for-mac/komorebi-bar/src/widgets/applications.rs | 2 +- komorebi-for-mac/komorebi-bar/src/widgets/komorebi.rs | 6 +++--- .../komorebi-bar/src/widgets/komorebi_layout.rs | 2 +- komorebi-for-mac/komorebi-bar/src/widgets/time.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/komorebi-for-mac/komorebi-bar/src/widgets/applications.rs b/komorebi-for-mac/komorebi-bar/src/widgets/applications.rs index e2d75250..edbe115d 100644 --- a/komorebi-for-mac/komorebi-bar/src/widgets/applications.rs +++ b/komorebi-for-mac/komorebi-bar/src/widgets/applications.rs @@ -310,7 +310,7 @@ impl Icon { #[inline] pub fn draw_fallback(ui: &mut Ui, icon_size: Vec2) { let (response, painter) = ui.allocate_painter(icon_size, Sense::hover()); - let stroke = Stroke::new(1.0, ui.style().visuals.text_color()); + let stroke = Stroke::new(1.0_f32, ui.style().visuals.text_color()); let mut rect = response.rect; let rounding = CornerRadius::same((rect.width() * 0.1) as u8); rect = rect.shrink(stroke.width); diff --git a/komorebi-for-mac/komorebi-bar/src/widgets/komorebi.rs b/komorebi-for-mac/komorebi-bar/src/widgets/komorebi.rs index 0b9cbaf5..cc1d1621 100644 --- a/komorebi-for-mac/komorebi-bar/src/widgets/komorebi.rs +++ b/komorebi-for-mac/komorebi-bar/src/widgets/komorebi.rs @@ -474,7 +474,7 @@ impl WorkspacesBar { .show(ui, |ui| { let (response, painter) = ui.allocate_painter(self.icon_size, Sense::hover()); let stroke: Stroke = Stroke::new( - 1.0, + 1.0_f32, if ws.is_selected { ctx.style().visuals.selection.stroke.color } else { @@ -643,7 +643,7 @@ impl WorkspaceLayerBar { if matches!(layer, WorkspaceLayer::Tiling) { let (response, painter) = ui.allocate_painter(size, Sense::hover()); let color = ctx.style().visuals.selection.stroke.color; - let stroke = Stroke::new(1.0, color); + let stroke = Stroke::new(1.0_f32, color); let mut rect = response.rect; let corner = CornerRadius::same((rect.width() * 0.1) as u8); rect = rect.shrink(stroke.width); @@ -666,7 +666,7 @@ impl WorkspaceLayerBar { } else { let (response, painter) = ui.allocate_painter(size, Sense::hover()); let color = ctx.style().visuals.selection.stroke.color; - let stroke = Stroke::new(1.0, color); + let stroke = Stroke::new(1.0_f32, color); let mut rect = response.rect; let corner = CornerRadius::same((rect.width() * 0.1) as u8); rect = rect.shrink(stroke.width); diff --git a/komorebi-for-mac/komorebi-bar/src/widgets/komorebi_layout.rs b/komorebi-for-mac/komorebi-bar/src/widgets/komorebi_layout.rs index c6b1c6a8..fffd5e38 100644 --- a/komorebi-for-mac/komorebi-bar/src/widgets/komorebi_layout.rs +++ b/komorebi-for-mac/komorebi-bar/src/widgets/komorebi_layout.rs @@ -146,7 +146,7 @@ impl KomorebiLayout { } else { ui.style().visuals.text_color() }; - let stroke = Stroke::new(1.0, color); + let stroke = Stroke::new(1.0_f32, color); let mut rect = response.rect; let rounding = CornerRadius::same((rect.width() * 0.1) as u8); rect = rect.shrink(stroke.width); diff --git a/komorebi-for-mac/komorebi-bar/src/widgets/time.rs b/komorebi-for-mac/komorebi-bar/src/widgets/time.rs index 384741a9..63b40226 100644 --- a/komorebi-for-mac/komorebi-bar/src/widgets/time.rs +++ b/komorebi-for-mac/komorebi-bar/src/widgets/time.rs @@ -317,7 +317,7 @@ impl Time { let (response, painter) = ui.allocate_painter(Vec2::new(width, full_height + offset * 2.0), Sense::hover()); let color = ctx.style().visuals.text_color(); - let stroke = Stroke::new(1.0, color); + let stroke = Stroke::new(1.0_f32, color); let round_all = CornerRadius::same((response.rect.width() * 0.1) as u8); let round_top = CornerRadius {