From cc7ddbccd4c060c33dc65b1ab128a3db57a23d65 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 2 May 2022 12:54:07 +0200 Subject: [PATCH] Gui: issue #6306 was fixed with 2cacbb41caf1f2 but this doesn't work on high DPI monitors. This commit fixes that now --- src/Gui/NaviCube.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Gui/NaviCube.cpp b/src/Gui/NaviCube.cpp index a70d4efe66..73a780b173 100644 --- a/src/Gui/NaviCube.cpp +++ b/src/Gui/NaviCube.cpp @@ -1578,8 +1578,9 @@ bool NaviCubeImplementation::mouseMoved(short x, short y) { m_Dragging = true; if (m_Dragging) { setHilite(0); - int width = this->m_View3DInventorViewer->width(); - int height = this->m_View3DInventorViewer->height(); + SbVec2s view = m_View3DInventorViewer->getSoRenderManager()->getSize(); + int width = view[0]; + int height = view[1]; int len = m_CubeWidgetSize / 2; m_CubeWidgetPosX = std::min(std::max(static_cast(x), len), width - len); m_CubeWidgetPosY = std::min(std::max(static_cast(y), len), height - len);