From d47c39f3da32e908f74cb5f853eab82860ddc151 Mon Sep 17 00:00:00 2001 From: Phenom Date: Wed, 15 Mar 2017 22:50:51 +0100 Subject: [PATCH] Fix windows height at first start. --- retroshare-gui/src/gui/common/rwindow.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/retroshare-gui/src/gui/common/rwindow.cpp b/retroshare-gui/src/gui/common/rwindow.cpp index 32cfba943..e86be7fa2 100644 --- a/retroshare-gui/src/gui/common/rwindow.cpp +++ b/retroshare-gui/src/gui/common/rwindow.cpp @@ -76,11 +76,20 @@ RWindow::restoreWindowState() m_bSaveStateOnClose = true; // now we save the window state on close #if QT_VERSION >= 0x040200 - QByteArray geometry = getSetting("Geometry", QByteArray()).toByteArray(); - if (geometry.isEmpty()) + QByteArray geo = getSetting("Geometry", QByteArray()).toByteArray(); + if (geo.isEmpty()) + { adjustSize(); + QRect rect = geometry(); + int h = fontMetrics().height()*40; + if (rect.height()