Use Qt's High-DPI scaling on Windows (#4868)

This commit is contained in:
nerix
2024-05-12 13:59:14 +02:00
committed by GitHub
parent 8202cd0d99
commit febcf464fe
21 changed files with 459 additions and 320 deletions
-13
View File
@@ -120,19 +120,6 @@ void BaseWidget::setScaleIndependantHeight(int value)
QSize(this->scaleIndependantSize_.width(), value));
}
float BaseWidget::qtFontScale() const
{
if (auto *window = dynamic_cast<BaseWindow *>(this->window()))
{
// ensure no div by 0
return this->scale() / std::max<float>(0.01f, window->nativeScale_);
}
else
{
return this->scale();
}
}
void BaseWidget::childEvent(QChildEvent *event)
{
if (event->added())