render: Scale contents according to zoom_level

This commit is contained in:
Victoria Brekenfeld 2025-01-23 15:45:00 +01:00 committed by Victoria Brekenfeld
parent 8e73fdebc6
commit 2e2943d99c
5 changed files with 105 additions and 26 deletions

View file

@ -256,6 +256,7 @@ pub fn draw_cursor<R>(
seat: &Seat<State>,
location: Point<f64, Logical>,
scale: Scale<f64>,
buffer_scale: f64,
time: Time<Monotonic>,
draw_default: bool,
) -> Vec<(CursorRenderElement<R>, Point<i32, BufferCoords>)>
@ -292,7 +293,7 @@ where
return Vec::new();
}
let integer_scale = scale.x.max(scale.y).ceil() as u32;
let integer_scale = (scale.x.max(scale.y) * buffer_scale).ceil() as u32;
let frame = state
.get_named_cursor(current_cursor)
.get_image(integer_scale, time.as_millis());