Wrong scaling of PDF in presentation mode on hi-dpi screen
Submitted by Aleksandr Popov
Opening any PDF file in presentation mode in version 3.22.0 (‘evince --presentation file.pdf’) only shows the top left quarter of each slide, when the Window scaling is set to 2 in gnome-tweak-tool.
Setting it to 1, or starting evince with any explicitly set value for GDK_SCALE, e.g. with ‘GDK_SCALE=1 evince --presentation file.pdf’, appears to fix the issue (but scale the UI incorrectly, obviously).
Both commands produce the same output on stderr:
(evince:28581): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed (evince:28581): Gtk-WARNING **: Allocating size to EvSidebar 0x5594adc98520 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?
The failed assertion message appears when entering the presentation mode, or going to the next slide in presentation mode.
Attached is the screenshot of a slide that appears when running ‘evince --presentation file.pdf’.