mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-15 09:27:09 -05:00
Merge pull request #749 from PhenomRetroShare/Fix_WindowsHeightAtFirstStart
Fix windows height at first start.
This commit is contained in:
commit
ccb632a442
@ -76,11 +76,20 @@ RWindow::restoreWindowState()
|
|||||||
m_bSaveStateOnClose = true; // now we save the window state on close
|
m_bSaveStateOnClose = true; // now we save the window state on close
|
||||||
|
|
||||||
#if QT_VERSION >= 0x040200
|
#if QT_VERSION >= 0x040200
|
||||||
QByteArray geometry = getSetting("Geometry", QByteArray()).toByteArray();
|
QByteArray geo = getSetting("Geometry", QByteArray()).toByteArray();
|
||||||
if (geometry.isEmpty())
|
if (geo.isEmpty())
|
||||||
|
{
|
||||||
adjustSize();
|
adjustSize();
|
||||||
|
QRect rect = geometry();
|
||||||
|
int h = fontMetrics().height()*40;
|
||||||
|
if (rect.height()<h)
|
||||||
|
{
|
||||||
|
rect.setHeight(h);
|
||||||
|
setGeometry(rect);
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
restoreGeometry(geometry);
|
restoreGeometry(geo);
|
||||||
#else
|
#else
|
||||||
QRect screen = QDesktopWidget().availableGeometry();
|
QRect screen = QDesktopWidget().availableGeometry();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user