Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

Fix scale of animate tool in all mode on high dpi monitors (#1900)

Jeremy Bullock63e8da9d531b
diff --git a/toonz/sources/tnztools/edittool.cpp b/toonz/sources/tnztools/edittool.cpp
index f7c6ec20a..5fade5b70 100644
--- a/toonz/sources/tnztools/edittool.cpp
+++ b/toonz/sources/tnztools/edittool.cpp
@@ -7,6 +7,7 @@
#include "tstroke.h"
#include "tgl.h"
#include "tenv.h"
+#include "toonzqt/gutil.h"
#include "toonz/tstageobjecttree.h"
#include "toonz/tstageobjectspline.h"
@@ -1206,7 +1207,7 @@ void EditTool::drawMainHandle() {
TAffine parentAff = xsh->getParentPlacement(objId, frame);
TAffine aff = xsh->getPlacement(objId, frame);
TPointD center = Stage::inch * xsh->getCenter(objId, frame);
-
+ int devPixRatio = getDevPixRatio();
// the gadget appears on the center of the level. orientation and dimension
// are independent of the movement of the level
glPushMatrix();
@@ -1217,7 +1218,7 @@ void EditTool::drawMainHandle() {
center = TPointD();
double unit = sqrt(tglGetPixelSize2());
-
+ unit *= devPixRatio;
bool dragging = m_dragTool != 0;
// draw center