2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Take custom scale in account when saving window geometry

This commit is contained in:
Ilya Fedin
2021-01-26 03:57:50 +04:00
committed by John Preston
parent 0b5213a9cb
commit 9c86755546
4 changed files with 42 additions and 4 deletions

View File

@@ -532,8 +532,15 @@ void writeSettings() {
auto position = cWindowPos();
data.stream << quint32(dbiWindowPosition) << qint32(position.x) << qint32(position.y) << qint32(position.w) << qint32(position.h);
data.stream << qint32(position.moncrc) << qint32(position.maximized);
data.stream << qint32(position.scale);
DEBUG_LOG(("Window Pos: Writing to storage %1, %2, %3, %4 (maximized %5)").arg(position.x).arg(position.y).arg(position.w).arg(position.h).arg(Logs::b(position.maximized)));
DEBUG_LOG(("Window Pos: Writing to storage %1, %2, %3, %4 (scale %5%, maximized %6)")
.arg(position.x)
.arg(position.y)
.arg(position.w)
.arg(position.h)
.arg(position.scale)
.arg(Logs::b(position.maximized)));
settings.writeEncrypted(data, SettingsKey);
}