From 3c5dac814c0992c69e85a3beb4ce8762e07d166b Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sat, 31 Oct 2026 10:14:41 -0700 Subject: [PATCH] refactor(mac-bar): converge time.rs onto the Windows spelling The two time.rs differed in three lines: a `default = false` schema attribute on changing_icon and the variant title "Default" for TimeFormat::Custom (both only in the macOS file; the title is a macOS mislabel), and `1.0` vs `1.0_f32` (same type). The macOS source now reads as the Windows one; the macOS schema view (komorebi_bar_core::schema) sets the macOS text back, so komorebi-for-mac/schema.bar.json and nix/komorebi-bar-options.nix are unchanged. The two files are now byte-identical. Verified: schema harness: macOS byte-identical (3,774 lines), Windows byte-identical (9,091 lines); Windows clippy -D warnings clean; macOS fake-CC check 0 errors. --- komorebi-for-mac/komorebi-bar/src/widgets/time.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/komorebi-for-mac/komorebi-bar/src/widgets/time.rs b/komorebi-for-mac/komorebi-bar/src/widgets/time.rs index 384741a9..0dd75299 100644 --- a/komorebi-for-mac/komorebi-bar/src/widgets/time.rs +++ b/komorebi-for-mac/komorebi-bar/src/widgets/time.rs @@ -94,7 +94,6 @@ pub struct TimeConfig { /// ``` pub timezone: Option, /// Change the icon depending on the time. The default icon is used between 8:30 and 12:00 - #[cfg_attr(feature = "schemars", schemars(extend("default" = false)))] pub changing_icon: Option, } @@ -136,7 +135,7 @@ pub enum TimeFormat { /// Twenty-four-hour format displayed as a binary clock with rectangles (with seconds) (https://en.wikipedia.org/wiki/Binary_clock) BinaryRectangle, /// Custom format (https://docs.rs/chrono/latest/chrono/format/strftime/index.html) - #[cfg_attr(feature = "schemars", schemars(title = "Default"))] + #[cfg_attr(feature = "schemars", schemars(title = "Custom"))] Custom(String), } @@ -317,7 +316,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 {