fixed dpi not initializing when the window shows

This commit is contained in:
Daniel _
2017-09-23 18:37:51 +02:00
parent 14511e10ef
commit 206a3518b0
6 changed files with 46 additions and 9 deletions
+11
View File
@@ -51,6 +51,17 @@ void BaseWidget::init()
});
}
void BaseWidget::initAsWindow()
{
#ifdef USEWINSDK
auto dpi = util::getWindowDpi(this->winId());
if (dpi) {
this->dpiMultiplier = dpi.value() / 96.f;
}
#endif
}
void BaseWidget::refreshTheme()
{
// Do any color scheme updates here