mirror of
https://github.com/86Box/86Box.git
synced 2026-02-24 20:35:32 -07:00
Fix remember size and position regression in which vertical size could grow when reopening the VM (#6239)
* Change window resizing logic when using 4:3 aspect ratio Change window resizing logic when using 4:3 aspect ratio to resize content only. Fixed issues in Remember size and position that are derived from the change. There is a slight flicker while resizing with force 4:3 aspect ratio. * Fix regression that adds vertical size when showing toolbar and statusbar and remembering size and po The recent rework on the force aspect 4:3 which needed to revisit the remembering of size and position introduced a regression that would save the size without considering the non-content window elements that could be showed or hidden. Now it calculates it accordingly.
This commit is contained in:
@@ -936,8 +936,11 @@ MainWindow::closeEvent(QCloseEvent *event)
|
||||
const bool wasMax = isMaximized();
|
||||
QRect normal = wasMax ? this->normalGeometry() : this->geometry();
|
||||
// Save WINDOW size (not the content widget’s 4:3 box)
|
||||
const int chromeHeight = geometry().height() - ui->stackedWidget->height();
|
||||
window_w = normal.width();
|
||||
window_h = normal.height();
|
||||
window_h = normal.height() - chromeHeight;
|
||||
if (window_h < 0)
|
||||
window_h = 0;
|
||||
if (!QApplication::platformName().contains("wayland")) {
|
||||
window_x = normal.x();
|
||||
window_y = normal.y();
|
||||
|
||||
Reference in New Issue
Block a user