chore(cargo): address clippy warnings

This commit is contained in:
LGUG2Z
2026-07-21 10:50:26 -07:00
parent ccb39abd2e
commit d29069398b
8 changed files with 16 additions and 30 deletions
+4 -4
View File
@@ -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);
}
+1 -1
View File
@@ -312,7 +312,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);
+3 -3
View File
@@ -467,7 +467,7 @@ impl WorkspacesBar {
fn show_fallback_icon(&self, ctx: &Context, ui: &mut Ui, ws: &WorkspaceInfo) -> Response {
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 {
@@ -629,7 +629,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);
@@ -652,7 +652,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);
+1 -1
View File
@@ -148,7 +148,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);
+1 -1
View File
@@ -316,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 {