kicad/common/gal
John Beard 6f78bb6960 Add configuration of Hi-DPI canvas scaling in OpenGL
First, add automatic detection of toolkit DPI scaling options. For now, this
is, in order,

* Check the GDK_SCALE option under GTK+ (users can set this to force the scaling)
* Check the value from WX's GetContentScalingFactor(). This will start to work
  correctly from WX 3.1 and GTK+ 3.10.

Then, add a user-settable override in the main prefs panel, next to the icon
scaling. This is independent of the icon scaling options.

DPI handling is performed in a standalone class, so they can be shared between
the prefs UI and the OpenGL backend easily. Also means Cairo could use the same
interface in future.

Also adjust the OpenGL grid drawing code to use the computed scale factor,
which avoids over-thick grids in scaled environments (the user can manually
thicken the grid if wanted).

Fixes: lp:1797308
* https://bugs.launchpad.net/kicad/+bug/1797308

Cherry-pick of: 567bdd9b9 (master)
2019-03-25 15:16:18 +00:00
..
cairo Print on Linux: use 600 DPI instead of the default 72 DPI (noticeable in Pcbnew) 2019-03-17 20:52:42 +01:00
opengl Add configuration of Hi-DPI canvas scaling in OpenGL 2019-03-25 15:16:18 +00:00
color4d.cpp colors: Add HSL conversion and tune colors 2019-02-11 22:08:41 -08:00
gal_display_options.cpp Add configuration of Hi-DPI canvas scaling in OpenGL 2019-03-25 15:16:18 +00:00
graphics_abstraction_layer.cpp grid: Set grid to use integer pixels 2019-02-23 19:27:45 -08:00
hidpi_gl_canvas.cpp Add configuration of Hi-DPI canvas scaling in OpenGL 2019-03-25 15:16:18 +00:00
stroke_font.cpp More performance enhancements. 2018-08-06 13:49:27 +01:00