Add one more line to text viewer (#7528)

This commit is contained in:
3djc
2020-04-21 15:14:20 +02:00
committed by GitHub
parent ce3f8374a1
commit 4ac35a2e23
5 changed files with 11 additions and 8 deletions
+4 -4
View File
@@ -42,7 +42,7 @@ bool menuTextView(event_t event)
break;
case EVT_ROTARY_RIGHT:
if (menuVerticalOffset + NUM_BODY_LINES >= lines_count)
if (menuVerticalOffset + TEXT_VIEWER_LINES >= lines_count)
break;
else
++menuVerticalOffset;
@@ -55,11 +55,11 @@ bool menuTextView(event_t event)
break;
}
for (int i=0; i<NUM_BODY_LINES; i++) {
lcd->drawTextMaxWidth(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP + i * FH, reusableBuffer.viewText.lines[i], 0, LCD_W - 2 * MENUS_MARGIN_LEFT);
for (int i = 0; i < TEXT_VIEWER_LINES; i++) {
lcd->drawTextMaxWidth(MENUS_MARGIN_LEFT, MENU_HEADER_HEIGHT + i * FH, reusableBuffer.viewText.lines[i], 0, LCD_W - 2 * MENUS_MARGIN_LEFT);
}
drawVerticalScrollbar(LCD_W-5, 50, 195, menuVerticalOffset, lines_count, NUM_BODY_LINES);
drawVerticalScrollbar(LCD_W-5, 50, 195, menuVerticalOffset, lines_count, TEXT_VIEWER_LINES);
return true;
}