mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Fix scrollbar thumb position for long menus
Advanced settings menu has 9 entries so the thumb ends up being one pixel high and on the 9th menu it ends up being closer to the middle of the screen rather than the end. This patch fixes it.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user