mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-24 08:10:50 +01:00
[escher] Remove big modal view drawing hack.
Change-Id: I09b0d9ee1db8db9a736577770f540e69cc78d660
This commit is contained in:
@@ -23,18 +23,12 @@ void ModalViewController::ContentView::setMainView(View * regularView) {
|
||||
}
|
||||
|
||||
int ModalViewController::ContentView::numberOfSubviews() const {
|
||||
KDRect regularFrame = bounds();
|
||||
KDRect modalFrame = modalViewFrame();
|
||||
bool shouldDrawTheRegularViewBehind = !modalFrame.contains(regularFrame.topLeft()) || !modalFrame.contains(regularFrame.bottomRight());
|
||||
return 1 + (m_isDisplayingModal && shouldDrawTheRegularViewBehind);
|
||||
return 1 + m_isDisplayingModal;
|
||||
}
|
||||
|
||||
View * ModalViewController::ContentView::subviewAtIndex(int index) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (m_isDisplayingModal && numberOfSubviews() == 1) {
|
||||
return m_currentModalView;
|
||||
}
|
||||
return m_regularView;
|
||||
case 1:
|
||||
if (numberOfSubviews() == 2) {
|
||||
|
||||
Reference in New Issue
Block a user