Commit ba117e11 authored by Alexandru Băluț's avatar Alexandru Băluț

previewers: Fix squished audio waveform

Refactored the code to calculate `surface_width` correctly. As a result,
removed some handlers which are not needed anymore, along with the
`_force_redraw` field. Now when the pre-drawn `surface` is created we
store the start, end, zoom, which are checked later in `do_draw` to
determine whether a new pre-drawn `surface` is needed.

Delayed the conversion of float values to int as much as possible, to
avoid small inconsistencies in how we calculate the `offset` at which
the `surface` is drawn.

Fixes #2195
parent d5632a5e
Pipeline #33296 failed with stages
in 7 minutes and 53 seconds