mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-15 13:22:19 +01:00
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.
This commit is contained in:
1 parent
b9125ddb65
commit
afd0f82f91
4 files changed
+6
-6
No files matched your search
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user