- int center_pixel = !rect_audio ?
- mwindow->edl->local_session->zoom_track / 2 + top_pixel :
- mwindow->edl->local_session->zoom_track + top_pixel ;
- int scale_y = !rect_audio ?
- mwindow->edl->local_session->zoom_y / 2 :
- mwindow->edl->local_session->zoom_y ;
- int bottom_pixel = top_pixel + mwindow->edl->local_session->zoom_track;
+ int center_pixel = !rect_audio ? data_h/2 + top_pixel : data_h + top_pixel;
+ int zoom_y = mwindow->edl->local_session->zoom_y * (int64_t)data_h /
+ mwindow->edl->local_session->zoom_atrack;
+ int scale_y = !rect_audio ? zoom_y/2 : zoom_y;
+ int bottom_pixel = top_pixel + data_h;