James-Yu / LaTeX-Workshop

Boost LaTeX typesetting efficiency with preview, compile, autocomplete, colorize, and more.
MIT License
10.47k stars 519 forks source link

Add padding to pdf viewer #4217

Closed weisJ closed 4 months ago

weisJ commented 4 months ago

Makes it easer to closely look at the top/bottom of the first/last page of the document.

James-Yu commented 4 months ago

Can you please post screenshots demonstrating the differences? Thanks.

weisJ commented 4 months ago

Without padding: Top of document is hidden by the toolbar

SCR-20240402-ttew

With padding: Toolbar doesn't hide the top of the document. The toolbar not shown as it is 32px = 2em high.

SCR-20240402-ttzo
James-Yu commented 4 months ago

Unfortunately, this PR cannot be merged as it breaks the restoration of viewer state, which is computed based on the absolute vertical distance from the bounding box. There is no easy fix afaik.