Improve 2D editor zoom logic

- Add 1-5 shortcuts to zoom between 100% and 1600% quickly
  (similar to GIMP).
- When holding down Alt, go through integer zoom values if above 100%
  or fractional zoom values with integer denominators if below 100%
  (50%, ~33.3%, 25%, …).
This commit is contained in:
Hugo Locurcio 2021-04-28 00:54:59 +02:00
parent a2d5f191d8
commit 43f9699a26
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C
3 changed files with 96 additions and 32 deletions

View file

@ -56,7 +56,7 @@ public:
float get_zoom();
void set_zoom(float p_zoom);
void set_zoom_by_increments(int p_increment_count);
void set_zoom_by_increments(int p_increment_count, bool p_integer_only = false);
};
#endif // EDITOR_ZOOM_WIDGET_H