mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: recreate the profile view when changing font size
Thus, we can keep the scale factor constant during existence of the view. For now, this is simpler than adapting existing text elements. We might want to make this more flexible later. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
e844b8dcad
commit
5df0efbc7f
1 changed files with 2 additions and 1 deletions
|
@ -160,7 +160,8 @@ void QMLProfile::setDevicePixelRatio(qreal dpr)
|
|||
{
|
||||
if (dpr != m_devicePixelRatio) {
|
||||
m_devicePixelRatio = dpr;
|
||||
m_profileWidget->setFontPrintScale(fontScale * dpr);
|
||||
// Recreate the view to redraw the text items with the new scale.
|
||||
createProfileView();
|
||||
updateDevicePixelRatio(dpr);
|
||||
emit devicePixelRatioChanged();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue