mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-16 05:41:16 +01:00
refactor(mac-bar): selected_frame.rs spells its strokes as the Windows bar does
The four Stroke::new(1.0, ...) calls become 1.0_f32, which is what the Windows copy has and what the compiler falls back to anyway (the f32: From<f64> fallback lint). Converge step before moving selected_frame.rs into komorebi-bar-core: afterwards both copies are byte-identical. No behaviour change. Verified: macOS fake-CC cargo check --locked --workspace --all-targets finished, 0 errors; the bar's warnings went from 10 to 6 (the four f32 literal fallbacks in this file are gone); macOS schema regeneration (harness) still byte-identical. Not verified: rendering.
This commit is contained in:
1 parent
eaf43a2ca4
commit
a56a691d10
1 file changed
+4
-4
@@ -50,7 +50,7 @@ impl SelectableFrame {
|
||||
let visuals = ui.style().interact_selectable(&response, selected);
|
||||
|
||||
Frame::NONE
|
||||
.stroke(Stroke::new(1.0, visuals.bg_stroke.color))
|
||||
.stroke(Stroke::new(1.0_f32, visuals.bg_stroke.color))
|
||||
.corner_radius(visuals.corner_radius)
|
||||
.fill(selected_fill.unwrap_or(visuals.bg_fill))
|
||||
.inner_margin(inner_margin)
|
||||
@@ -59,7 +59,7 @@ impl SelectableFrame {
|
||||
let visuals = ui.style().interact_selectable(&response, selected);
|
||||
|
||||
Frame::NONE
|
||||
.stroke(Stroke::new(1.0, visuals.bg_stroke.color))
|
||||
.stroke(Stroke::new(1.0_f32, visuals.bg_stroke.color))
|
||||
.corner_radius(visuals.corner_radius)
|
||||
.fill(visuals.bg_fill)
|
||||
.inner_margin(inner_margin)
|
||||
@@ -68,14 +68,14 @@ impl SelectableFrame {
|
||||
let visuals = ui.style().interact_selectable(&response, selected);
|
||||
|
||||
Frame::NONE
|
||||
.stroke(Stroke::new(1.0, visuals.bg_fill))
|
||||
.stroke(Stroke::new(1.0_f32, visuals.bg_fill))
|
||||
.corner_radius(visuals.corner_radius)
|
||||
.fill(selected_fill.unwrap_or(visuals.bg_fill))
|
||||
.inner_margin(inner_margin)
|
||||
.show(ui, add_contents);
|
||||
} else {
|
||||
Frame::NONE
|
||||
.stroke(Stroke::new(1.0, Color32::TRANSPARENT))
|
||||
.stroke(Stroke::new(1.0_f32, Color32::TRANSPARENT))
|
||||
.inner_margin(inner_margin)
|
||||
.show(ui, add_contents);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user