mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-26 17:20:53 +01:00
[escher] In alternate empty view controller, do not layout the main view
as long as the view is empty Change-Id: Ia079e350a5dc58ba73cda81de3918be3249e29d0
This commit is contained in:
@@ -32,8 +32,11 @@ View * AlternateEmptyViewController::ContentView::subviewAtIndex(int index) {
|
||||
}
|
||||
|
||||
void AlternateEmptyViewController::ContentView::layoutSubviews() {
|
||||
m_message.setFrame(bounds());
|
||||
m_mainViewController->view()->setFrame(bounds());
|
||||
if (alternateEmptyViewDelegate()->isEmpty()) {
|
||||
m_message.setFrame(bounds());
|
||||
} else {
|
||||
m_mainViewController->view()->setFrame(bounds());
|
||||
}
|
||||
}
|
||||
|
||||
ViewController * AlternateEmptyViewController::ContentView::mainViewController() const {
|
||||
@@ -72,6 +75,7 @@ bool AlternateEmptyViewController::handleEvent(Ion::Events::Event event) {
|
||||
}
|
||||
|
||||
void AlternateEmptyViewController::didBecomeFirstResponder() {
|
||||
m_contentView.layoutSubviews();
|
||||
if (!m_contentView.alternateEmptyViewDelegate()->isEmpty()) {
|
||||
app()->setFirstResponder(m_contentView.mainViewController());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user