mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-08-30 23:47:14 +02:00
chore(cargo): address clippy warnings
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user