aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao2017-08-28 14:42:12 -0500
committerGerrit Code Review2017-08-28 14:42:12 -0500
commite9605b8ca01fba6b0ed2d01677815882d6371a53 (patch)
tree2ba7c296c3e22533d4fce9d85bba1c8a45e52941 /wear_ui.cpp
parent2e125bec2fbc190659f2ec14d8cbb3ca1c6352f1 (diff)
parent1e27d14eea7c11eb099e0e05dd0e26a49f21a13b (diff)
downloadplatform-bootable-recovery-e9605b8ca01fba6b0ed2d01677815882d6371a53.tar.gz
platform-bootable-recovery-e9605b8ca01fba6b0ed2d01677815882d6371a53.tar.xz
platform-bootable-recovery-e9605b8ca01fba6b0ed2d01677815882d6371a53.zip
Merge "wear_ui: Remove kMaxCols/kMaxRows/visible_text_rows/menu_headers_."
Diffstat (limited to 'wear_ui.cpp')
-rw-r--r--wear_ui.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/wear_ui.cpp b/wear_ui.cpp
index 75d01bdc..e4806718 100644
--- a/wear_ui.cpp
+++ b/wear_ui.cpp
@@ -185,20 +185,6 @@ void WearRecoveryUI::update_progress_locked() {
185 gr_flip(); 185 gr_flip();
186} 186}
187 187
188bool WearRecoveryUI::InitTextParams() {
189 if (!ScreenRecoveryUI::InitTextParams()) {
190 return false;
191 }
192
193 text_cols_ = (gr_fb_width() - (kMarginWidth * 2)) / char_width_;
194
195 if (text_rows_ > kMaxRows) text_rows_ = kMaxRows;
196 if (text_cols_ > kMaxCols) text_cols_ = kMaxCols;
197
198 visible_text_rows = (gr_fb_height() - (kMarginHeight * 2)) / char_height_;
199 return true;
200}
201
202bool WearRecoveryUI::Init(const std::string& locale) { 188bool WearRecoveryUI::Init(const std::string& locale) {
203 if (!ScreenRecoveryUI::Init(locale)) { 189 if (!ScreenRecoveryUI::Init(locale)) {
204 return false; 190 return false;
@@ -263,7 +249,7 @@ void WearRecoveryUI::StartMenu(const char* const* headers, const char* const* it
263 show_menu = true; 249 show_menu = true;
264 menu_sel = initial_selection; 250 menu_sel = initial_selection;
265 menu_start = 0; 251 menu_start = 0;
266 menu_end = visible_text_rows - 1 - kMenuUnusableRows; 252 menu_end = text_rows_ - 1 - kMenuUnusableRows;
267 if (menu_items <= menu_end) menu_end = menu_items; 253 if (menu_items <= menu_end) menu_end = menu_items;
268 update_screen_locked(); 254 update_screen_locked();
269 } 255 }