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.
This commit is contained in:
LGUG2Z committed 2026-10-31 10:15:33 -07:00
1 parent d8aa0dcd62
commit 3c5dac814c
1 file changed
+2 -3
@@ -94,7 +94,6 @@ pub struct TimeConfig {
/// ```
pub timezone: Option<String>,
/// 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<bool>,
}
@@ -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 {