Commit 79d66b84 authored by Andreas Traczyk's avatar Andreas Traczyk

mainwindow: set scaling value on show slot

Change-Id: I974bf732eae1701a53af790d55fce0d22eafbb28
parent 45f56c98
......@@ -341,7 +341,9 @@ MainWindow::show()
disconnect(screenChangedConnection_);
screenChangedConnection_ = connect(windowHandle(), &QWindow::screenChanged,
this, &MainWindow::slotScreenChanged);
currentScalingRatio_ = 1.0;
auto screenNumber = qApp->desktop()->screenNumber();
QScreen* screen = qApp->screens().at(screenNumber);
currentScalingRatio_ = screen->logicalDotsPerInchX() / 96;
qobject_cast<NavWidget*>(ui->navStack->currentWidget())->updateCustomUI();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment