From 153772cb68a640a817f31ef48187f0a01485dc87 Mon Sep 17 00:00:00 2001 From: Patrick Horlebein Date: Fri, 3 Apr 2020 17:12:31 +0200 Subject: [PATCH] Add a 2 pixel wide space in menus for scrolling indicator --- workspace/TS100/Core/Src/gui.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/workspace/TS100/Core/Src/gui.cpp b/workspace/TS100/Core/Src/gui.cpp index 42834655..8070fd39 100644 --- a/workspace/TS100/Core/Src/gui.cpp +++ b/workspace/TS100/Core/Src/gui.cpp @@ -264,6 +264,8 @@ static void printShortDescription(uint32_t shortDescIndex, // prepare cursor for value OLED::setFont(0); OLED::setCharCursor(cursorCharPosition, 0); + // make room for scroll indicator + OLED::setCursor(OLED::getCursorX() - 2, 0); } static int userConfirmation(const char *message) { @@ -782,7 +784,8 @@ static void displayMenu(size_t index) { OLED::print(SettingsMenuEntries[index]); // Draw symbol // 16 pixel wide image - OLED::drawArea(96 - 16, 0, 16, 16, (&SettingsMenuIcons[(16 * 2) * index])); + // 2 pixel wide scrolling indicator + OLED::drawArea(96 - 16 - 2, 0, 16, 16, (&SettingsMenuIcons[(16 * 2) * index])); } static void settings_displayCalibrateVIN(void) {