0dist / oscc

Dark-themed interface for the mpv player
45 stars 1 forks source link

Round thumbnail border coordinates, simplify conditions #3

Closed po5 closed 1 year ago

po5 commented 1 year ago

Thumbnail border could be misaligned by up to half a pixel in both directions.
That's because image overlays must be aligned to a pixel, but our ASS border wasn't aligned.

Add math.floor(thumb_pos + 0.5) to round to the nearest integer and get an even border on all sides.

Fix a horizontal coordinate mistakenly scaled by the vertical scale factor.

Simplify conditions for requesting and clearing thumbnails, requires latest thumbfast.