From 85fa895734bbaae4607fd7fb443f2b0f8d283734 Mon Sep 17 00:00:00 2001 From: localhorst Date: Sat, 1 Oct 2022 13:18:21 +0200 Subject: [PATCH] TUI: fix y offset entries --- src/tui.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/tui.cpp b/src/tui.cpp index 4c0fbab..e85b30b 100644 --- a/src/tui.cpp +++ b/src/tui.cpp @@ -170,14 +170,12 @@ void TUI::updateTUI(list * plistDrives, uint8_t u8SelectedEntry) break; } - uint16_t u16StartOffsetY = (6 * (u8Index)); + uint16_t u16StartOffsetY = (4 * (u8Index)); - if(u8Index == 0) - { - u16StartOffsetY = u16StartOffsetY + 2; - } + + Logger::logThis()->info("Index: " + to_string(u8Index) + " Offset: " + to_string(u16StartOffsetY)); - WINDOW * tmp = createEntryWindow( (int)(u16StdscrX *(float)(3.0/7.0) - 2), 4, 3, u16StartOffsetY, (distance(plistDrives->begin(), it)+1), sModelFamily, sSerial, sCapacity, sState, sTime, sSpeed, sTemp, bSelectedEntry); + WINDOW * tmp = createEntryWindow( (int)(u16StdscrX *(float)(3.0/7.0) - 2), 4, 3, u16StartOffsetY + 2, (distance(plistDrives->begin(), it)+1), sModelFamily, sSerial, sCapacity, sState, sTime, sSpeed, sTemp, bSelectedEntry); wrefresh(tmp); u8Index++; }//end loop though drives