Merged Jeremie Knuesel requested to merge knuesel/zathura:feature/hidpi into develop

Add support for HiDPI displays.

Changes compared to the commit mentioned in issue 429:

  • HiDPI changes are detected using the notify::scale-factor signal. I couldn't test it by moving the window between monitors, but it works when changing the scaling factor in the GNOME Shell tweak tool.
  • Preprocessor conditionals in config.mk to enable the code only for sufficiently recent GTK+ and Cairo.
  • The flicker artifact was due to an incorrect thumbnail scaling calculation. This is fixed here.

Design note: GTK+ gives a single scale factor, as integer. Meanwhile the changes proposed here work with separate x and y factors, as floating point values. This was chosen mainly to match the Cairo API. It could also prove useful soon, as it looks like GNOME will get support for fractional scaling (not sure what the API will be though) and fractional scaling is already supported by xrandr for example.

Edited by Sebastian Ramacher

Merge request reports