Merge pull request #49437 from Calinou/graphedit-allow-higher-lower-zoom-values

Allow higher and lower maximum zoom values in GraphEdit
This commit is contained in:
Rémi Verschelde 2021-06-15 15:18:17 +02:00 committed by GitHub
commit e479abeb98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,8 +42,13 @@
#define ZOOM_SCALE 1.2
#define MIN_ZOOM (((1 / ZOOM_SCALE) / ZOOM_SCALE) / ZOOM_SCALE)
#define MAX_ZOOM (1 * ZOOM_SCALE * ZOOM_SCALE * ZOOM_SCALE)
// Allow dezooming 8 times from the default zoom level.
// At low zoom levels, text is unreadable due to its small size and poor filtering,
// but this is still useful for previewing purposes.
#define MIN_ZOOM (1 / Math::pow(ZOOM_SCALE, 8))
// Allow zooming 4 times from the default zoom level.
#define MAX_ZOOM (1 * Math::pow(ZOOM_SCALE, 4))
#define MINIMAP_OFFSET 12
#define MINIMAP_PADDING 5