diff options
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ce117ee..a7bdb58 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -163,12 +163,20 @@ void MainWindow::reLayout() // Log window if (m_messages != nullptr) { QRect lwSize(QPoint(logoSize.width(), m_ScreenRect.height() * 3/4), QPoint(m_ScreenRect.width() - distroSize.width(), m_ScreenRect.height())); + if (m_LoginForm != nullptr && lwSize.top() < m_LoginForm->geometry().bottom()) { + lwSize.setTop(m_LoginForm->geometry().bottom()); + } lwSize.adjust(10, 10, -10, -10); - m_messages->setGeometry(lwSize); - int ps = lwSize.height() / 20; - if (ps > 20) ps = 20; - m_messages->setFontPointSize(ps); - newsBottom = lwSize.top(); + if (lwSize.height() < 10) { + m_messages->hide(); + } else { + m_messages->show(); + m_messages->setGeometry(lwSize); + int ps = lwSize.height() / 20; + if (ps > 20) ps = 20; + m_messages->setFontPointSize(ps); + newsBottom = lwSize.top(); + } } if (m_Clock != nullptr) { m_Clock->setFixedWidth(m_ScreenRect.width()); @@ -185,6 +193,10 @@ void MainWindow::reLayout() m_News->show(); } } + if (m_LoginForm != nullptr) { + // This is most important, so bring to top + m_LoginForm->raise(); + } } void MainWindow::paintEvent(QPaintEvent *event) @@ -239,9 +251,7 @@ QSize MainWindow::createLogo(QRect max) QString filePath = fileInfo.absoluteFilePath(); createNextLogo(max, retval, filePath); } - return retval; } - createNextLogo(max, retval, path); return retval; } |