Skip to content

Commit

Permalink
[release] fixdprfloat
Browse files Browse the repository at this point in the history
  • Loading branch information
archibate committed Jun 28, 2022
1 parent 67a6d29 commit 16baf30
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions ui/zenoedit/startup/zstartup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion ui/zenoedit/viewport/viewportwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 16baf30

Please sign in to comment.