chore: clippy
This commit is contained in:
parent
c13e52da04
commit
2ca99c670a
59 changed files with 1974 additions and 2137 deletions
|
|
@ -85,8 +85,8 @@ where
|
|||
};
|
||||
|
||||
let buf_translation = Matrix3::from_translation(Vector2::new(
|
||||
(view.src.loc.x as f64 / buf_size.w as f64) as f32,
|
||||
(view.src.loc.y as f64 / buf_size.h as f64) as f32,
|
||||
(view.src.loc.x / buf_size.w as f64) as f32,
|
||||
(view.src.loc.y / buf_size.h as f64) as f32,
|
||||
));
|
||||
|
||||
let input_to_geo =
|
||||
|
|
|
|||
|
|
@ -528,19 +528,17 @@ where
|
|||
);
|
||||
}
|
||||
|
||||
if !exclude_dnd_icon {
|
||||
if let Some(dnd_icon) = get_dnd_icon(seat) {
|
||||
elements.extend(
|
||||
cursor::draw_dnd_icon(
|
||||
renderer,
|
||||
&dnd_icon.surface,
|
||||
(location + dnd_icon.offset.to_f64()).to_i32_round(),
|
||||
scale,
|
||||
)
|
||||
.into_iter()
|
||||
.map(CosmicElement::Dnd),
|
||||
);
|
||||
}
|
||||
if !exclude_dnd_icon && let Some(dnd_icon) = get_dnd_icon(seat) {
|
||||
elements.extend(
|
||||
cursor::draw_dnd_icon(
|
||||
renderer,
|
||||
&dnd_icon.surface,
|
||||
(location + dnd_icon.offset.to_f64()).to_i32_round(),
|
||||
scale,
|
||||
)
|
||||
.into_iter()
|
||||
.map(CosmicElement::Dnd),
|
||||
);
|
||||
}
|
||||
|
||||
let theme = theme.cosmic();
|
||||
|
|
@ -1102,17 +1100,15 @@ impl PostprocessState {
|
|||
if let (Some(tex), Some(tracker)) = (
|
||||
self.cursor_texture.as_ref(),
|
||||
self.cursor_damage_tracker.as_ref(),
|
||||
) {
|
||||
if tex.format().is_some_and(|f| f == format)
|
||||
&& tracker.mode()
|
||||
== &(OutputModeSource::Static {
|
||||
size,
|
||||
scale,
|
||||
transform: Transform::Normal,
|
||||
})
|
||||
{
|
||||
return Ok(());
|
||||
}
|
||||
) && tex.format().is_some_and(|f| f == format)
|
||||
&& tracker.mode()
|
||||
== &(OutputModeSource::Static {
|
||||
size,
|
||||
scale,
|
||||
transform: Transform::Normal,
|
||||
})
|
||||
{
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let texture = Offscreen::<GlesTexture>::create_buffer(renderer, format, buffer_size)?;
|
||||
|
|
|
|||
|
|
@ -61,10 +61,10 @@ impl ShadowShader {
|
|||
|
||||
let mut geo = geo.to_f64();
|
||||
let fractional_pixel = scale.ceil() / scale;
|
||||
geo.loc.x = geo.loc.x + fractional_pixel;
|
||||
geo.loc.y = geo.loc.y + fractional_pixel;
|
||||
geo.size.w = geo.size.w - fractional_pixel * 2.;
|
||||
geo.size.h = geo.size.h - fractional_pixel * 2.;
|
||||
geo.loc.x += fractional_pixel;
|
||||
geo.loc.y += fractional_pixel;
|
||||
geo.size.w -= fractional_pixel * 2.;
|
||||
geo.size.h -= fractional_pixel * 2.;
|
||||
|
||||
let user_data = Borrow::<GlesRenderer>::borrow(renderer.glow_renderer())
|
||||
.egl_context()
|
||||
|
|
@ -125,7 +125,7 @@ impl ShadowShader {
|
|||
.cast::<f32>()
|
||||
.unwrap();
|
||||
|
||||
let window_geo_loc = Vector2::new(window_geo.loc.x as f64, window_geo.loc.y as f64);
|
||||
let window_geo_loc = Vector2::new(window_geo.loc.x, window_geo.loc.y);
|
||||
let window_input_to_geo = (Matrix3::from_nonuniform_scale(area_size.x, area_size.y)
|
||||
* Matrix3::from_translation(Vector2::new(
|
||||
-window_geo_loc.x / area_size.x,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue