diff --git a/ui/zenoedit/startup/zstartup.cpp b/ui/zenoedit/startup/zstartup.cpp index 649077693f..18d4728bfa 100644 --- a/ui/zenoedit/startup/zstartup.cpp +++ b/ui/zenoedit/startup/zstartup.cpp @@ -12,6 +12,15 @@ void startUp() zeno::setConfigVariable("NASLOC", nas_loc_v.toString().toStdString()); } +#if 0 + QVariant scalefac_v = settings.value("scale_factor"); + if (!scalefac_v.isNull()) { + float scalefac = scalefac_v.toFloat(); + if (scalefac >= 1.0f) + qputenv("QT_SCALE_FACTOR", QString::number(scalefac).toLatin1()); + } +#endif + static int calledOnce = ([]{ zeno::getSession().eventCallbacks->triggerEvent("init"); }(), 0); diff --git a/ui/zenoedit/viewport/viewportwidget.cpp b/ui/zenoedit/viewport/viewportwidget.cpp index f93ae30abb..d016474300 100644 --- a/ui/zenoedit/viewport/viewportwidget.cpp +++ b/ui/zenoedit/viewport/viewportwidget.cpp @@ -323,7 +323,8 @@ void ViewportWidget::initializeGL() void ViewportWidget::resizeGL(int nx, int ny) { - float ratio = QApplication::desktop()->devicePixelRatio(); + float ratio = devicePixelRatioF(); + zeno::log_trace("nx={}, ny={}, dpr={}", nx, ny, ratio); m_camera->setRes(QVector2D(nx * ratio, ny * ratio)); m_camera->updatePerspective(); }