Skip to content
Snippets Groups Projects
Commit 79d66b84 authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

mainwindow: set scaling value on show slot

Change-Id: I974bf732eae1701a53af790d55fce0d22eafbb28
parent 45f56c98
Branches
No related tags found
No related merge requests found
...@@ -341,7 +341,9 @@ MainWindow::show() ...@@ -341,7 +341,9 @@ MainWindow::show()
disconnect(screenChangedConnection_); disconnect(screenChangedConnection_);
screenChangedConnection_ = connect(windowHandle(), &QWindow::screenChanged, screenChangedConnection_ = connect(windowHandle(), &QWindow::screenChanged,
this, &MainWindow::slotScreenChanged); 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(); qobject_cast<NavWidget*>(ui->navStack->currentWidget())->updateCustomUI();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment