mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QMLManager: helper function for devivePixelRatio
This allows us to use the single manager object to keep track of the dpr of the screen and to pass it on if it changes (or when it first becomes known). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
308b69359d
commit
7f99d9e9c3
2 changed files with 16 additions and 0 deletions
|
@ -954,3 +954,14 @@ void QMLManager::setAccessingCloud(bool status)
|
|||
m_accessingCloud = status;
|
||||
emit accessingCloudChanged();
|
||||
}
|
||||
|
||||
qreal QMLManager::lastDevicePixelRatio()
|
||||
{
|
||||
return m_lastDevicePixelRatio;
|
||||
}
|
||||
|
||||
void QMLManager::screenChanged(QScreen *screen)
|
||||
{
|
||||
m_lastDevicePixelRatio = screen->devicePixelRatio();
|
||||
emit sendScreenChanged(screen);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue