mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps] Avoid useless blinking in row button view
Change-Id: Ib4cba9a4c08b66fcbd26c6afd183c670ee670944
This commit is contained in:
@@ -49,10 +49,15 @@ int ButtonRowController::ContentView::numberOfSubviews() const {
|
||||
}
|
||||
|
||||
View * ButtonRowController::ContentView::subviewAtIndex(int index) {
|
||||
if (index == 0) {
|
||||
/* Warning: the order of the subviews is important for drity tracking.
|
||||
* Indeed, when a child is redrawn, the redrawn area is the smallest
|
||||
* rectangle unioniong the dirty rectangle and the previous redrawn area.
|
||||
* As the main view is more likely to be bigger, we prefer to set it as the
|
||||
* last child. */
|
||||
if (index == numberOfSubviews() - 1) {
|
||||
return m_mainViewController->view();
|
||||
} else {
|
||||
return buttonAtIndex(index - 1);
|
||||
return buttonAtIndex(index);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user