1
0
forked from me/IronOS

Merge pull request #660 from paulfertser/fix-thumb-position

Fix scrollbar thumb position for long menus
This commit is contained in:
Ben V. Brown
2020-06-21 10:23:41 +10:00
committed by GitHub

View File

@@ -935,7 +935,7 @@ void gui_Menu(const menuitem *menu) {
OLED::clearScreen();
menu[currentScreen].draw.func();
uint8_t indicatorHeight = OLED_HEIGHT / scrollContentSize;
uint8_t position = currentScreen * indicatorHeight;
uint8_t position = OLED_HEIGHT * currentScreen / scrollContentSize;
OLED::drawScrollIndicator(position, indicatorHeight);
lastOffset = -1;
lcdRefresh = true;