[escher/modal_view_controller] Hide regular view

Do not display the regular view when the main view takes up all the
frame.
This fixes a bug causing the language menu to be briefly visible before
the logo on start-up.

Change-Id: Ia2de44de52ac6f852e0eca05101587042f02913b
This commit is contained in:
Gabriel Ozouf
2020-09-25 11:13:12 +02:00
committed by Émilie Feral
parent 77ac333e11
commit 54c28fc87f

View File

@@ -56,11 +56,13 @@ KDRect ModalViewController::ContentView::modalViewFrame() const {
void ModalViewController::ContentView::layoutSubviews(bool force) {
assert(m_regularView != nullptr);
m_regularView->setFrame(bounds(), force);
if (m_isDisplayingModal) {
assert(m_currentModalView != nullptr);
m_currentModalView->setFrame(modalViewFrame(), force);
KDRect modalFrame = modalViewFrame();
m_regularView->setFrame(modalFrame == bounds() ? KDRectZero : bounds(), force);
m_currentModalView->setFrame(modalFrame, force);
} else {
m_regularView->setFrame(bounds(), force);
if (m_currentModalView) {
m_currentModalView->setFrame(KDRectZero, force);
}