Fix ScreenRecoveryUI to handle devices without power/up/down.
Currently fugu has a custom subclass to handle this. The default code supports devices with trackballs but not all shipping Nexus devices? That's just silly. Change-Id: Id2779c91284899a26b4bb1af41e7033aa889df10
This commit is contained in:
+10
-1
@@ -185,6 +185,9 @@ void ScreenRecoveryUI::SetColor(UIElement e) {
|
||||
case MENU_SEL_BG:
|
||||
gr_color(0, 106, 157, 255);
|
||||
break;
|
||||
case MENU_SEL_BG_ACTIVE:
|
||||
gr_color(0, 156, 100, 255);
|
||||
break;
|
||||
case MENU_SEL_FG:
|
||||
gr_color(255, 255, 255, 255);
|
||||
break;
|
||||
@@ -220,7 +223,7 @@ void ScreenRecoveryUI::draw_screen_locked() {
|
||||
|
||||
if (i == menu_top + menu_sel) {
|
||||
// draw the highlight bar
|
||||
SetColor(MENU_SEL_BG);
|
||||
SetColor(IsLongPress() ? MENU_SEL_BG_ACTIVE : MENU_SEL_BG);
|
||||
gr_fill(0, y-2, gr_fb_width(), y+char_height+2);
|
||||
// white text of selected item
|
||||
SetColor(MENU_SEL_FG);
|
||||
@@ -638,3 +641,9 @@ void ScreenRecoveryUI::Redraw() {
|
||||
update_screen_locked();
|
||||
pthread_mutex_unlock(&updateMutex);
|
||||
}
|
||||
|
||||
void ScreenRecoveryUI::KeyLongPress(int) {
|
||||
// Redraw so that if we're in the menu, the highlight
|
||||
// will change color to indicate a successful long press.
|
||||
Redraw();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user