Improve restoring layout when RestoreOption_RelativeToMainWindow is used

Doesn't make much sense to apply a scalling factor to the floating window's
position. Instead we should apply the factor to the delta position between
the main window and the floating window

Fixes #171
This commit is contained in:
Sergio Martins
2021-02-23 21:02:01 +00:00
parent 1f11c732ed
commit 2116e3741b

View File

@@ -995,8 +995,7 @@ void LayoutSaver::ScalingInfo::translatePos(QPoint &pt) const
void LayoutSaver::ScalingInfo::applyFactorsTo(QPoint &pt) const
{
pt.setX(qCeil(pt.x() * widthFactor));
pt.setY(qCeil(pt.y() * heightFactor));
translatePos(pt);
}
void LayoutSaver::ScalingInfo::applyFactorsTo(QSize &sz) const