Skip to content
  • Alexandru Băluț's avatar
    previewers: Fix squished audio waveform · ba117e11
    Alexandru Băluț authored
    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
    ba117e11