TUI: shrunk down hight of entry
This commit is contained in:
parent
c4adf03bf5
commit
75394a3501
26
src/tui.cpp
26
src/tui.cpp
|
@ -170,12 +170,12 @@ void TUI::updateTUI(list <Drive>* plistDrives, uint8_t u8SelectedEntry)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t u16StartOffsetY = (4 * (u8Index));
|
uint16_t u16StartOffsetY = (2 * (u8Index));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Logger::logThis()->info("Index: " + to_string(u8Index) + " Offset: " + to_string(u16StartOffsetY));
|
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 + 2, (distance(plistDrives->begin(), it)+1), sModelFamily, sSerial, sCapacity, sState, sTime, sSpeed, sTemp, bSelectedEntry);
|
WINDOW * tmp = createEntryWindow( (int)(u16StdscrX *(float)(3.0/7.0) - 2), 2, 3, u16StartOffsetY + 2, (distance(plistDrives->begin(), it)+1), sModelFamily, sSerial, sCapacity, sState, sTime, sSpeed, sTemp, bSelectedEntry);
|
||||||
wrefresh(tmp);
|
wrefresh(tmp);
|
||||||
u8Index++;
|
u8Index++;
|
||||||
}//end loop though drives
|
}//end loop though drives
|
||||||
|
@ -353,10 +353,10 @@ WINDOW* TUI::createEntryWindow(int iXSize, int iYSize, int iXStart, int iYStart,
|
||||||
wbkgd(newWindow, COLOR_PAIR(COLOR_AREA_ENTRY_SELECTED));
|
wbkgd(newWindow, COLOR_PAIR(COLOR_AREA_ENTRY_SELECTED));
|
||||||
}
|
}
|
||||||
|
|
||||||
box(newWindow, ACS_VLINE, ACS_HLINE);
|
//box(newWindow, ACS_VLINE, ACS_HLINE);
|
||||||
|
|
||||||
//index number
|
//index number
|
||||||
mvwaddstr(newWindow,1, 1, to_string(iListIndex).c_str());
|
mvwaddstr(newWindow,0, 1, to_string(iListIndex).c_str());
|
||||||
|
|
||||||
/*
|
/*
|
||||||
70 chars in x-axis
|
70 chars in x-axis
|
||||||
|
@ -369,7 +369,7 @@ WINDOW* TUI::createEntryWindow(int iXSize, int iYSize, int iXStart, int iYStart,
|
||||||
36: space
|
36: space
|
||||||
37-43: Capacity
|
37-43: Capacity
|
||||||
44: space
|
44: space
|
||||||
45-49: Temp
|
47-49: Temp
|
||||||
|
|
||||||
line:02
|
line:02
|
||||||
0-2: space
|
0-2: space
|
||||||
|
@ -383,15 +383,15 @@ WINDOW* TUI::createEntryWindow(int iXSize, int iYSize, int iXStart, int iYStart,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
vTruncateText(&sModelFamily, 32);
|
vTruncateText(&sModelFamily, 32);
|
||||||
mvwaddstr(newWindow, 1, 3, sModelFamily.c_str());
|
mvwaddstr(newWindow, 0, 3, sModelFamily.c_str());
|
||||||
mvwaddstr(newWindow, 1, 37, sCapacity.c_str());
|
mvwaddstr(newWindow, 0, 37, sCapacity.c_str());
|
||||||
mvwaddstr(newWindow, 1, 45, sTemp.c_str());
|
mvwaddstr(newWindow, 0, 47, sTemp.c_str());
|
||||||
|
|
||||||
vTruncateText(&sSerial, 28);
|
vTruncateText(&sSerial, 28);
|
||||||
mvwaddstr(newWindow, 2, 3, sSerial.c_str());
|
mvwaddstr(newWindow, 1, 3, sSerial.c_str());
|
||||||
mvwaddstr(newWindow, 2, 33, sSpeed.c_str());
|
mvwaddstr(newWindow, 1, 33, sSpeed.c_str());
|
||||||
mvwaddstr(newWindow, 2, 47, sTime.c_str());
|
mvwaddstr(newWindow, 1, 47, sTime.c_str());
|
||||||
mvwaddstr(newWindow,2, iXSize - sState.length() - 2, sState.c_str());
|
mvwaddstr(newWindow, 1, iXSize - sState.length() - 2, sState.c_str());
|
||||||
|
|
||||||
return newWindow;
|
return newWindow;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue