Improved layout in GUI

Fixed some elements being cut-off with the smaller GUI width
This commit is contained in:
Dimitris Panokostas 2017-01-28 21:35:47 +01:00
parent ae9ca6708b
commit 543e64cbca
5 changed files with 44 additions and 41 deletions

View file

@ -321,6 +321,8 @@ void InitPanelHD(const struct _ConfigCategory& category)
addHardfileActionListener = new AddHardfileActionListener();
createHardfileActionListener = new CreateHardfileActionListener();
int textFieldWidth = category.panel->getWidth() - 2 * DISTANCE_BORDER - SMALL_BUTTON_WIDTH - DISTANCE_NEXT_X;
for(col=0; col<COL_COUNT; ++col)
lblList[col] = new gcn::Label(column_caption[col]);
@ -348,7 +350,7 @@ void InitPanelHD(const struct _ConfigCategory& category)
for(col=0; col<COL_COUNT; ++col)
{
listCells[row][col] = new gcn::TextField();
listCells[row][col]->setSize(COLUMN_SIZE[col] - 8, TEXTFIELD_HEIGHT);
listCells[row][col]->setSize(textFieldWidth, TEXTFIELD_HEIGHT);
listCells[row][col]->setEnabled(false);
listCells[row][col]->setBackgroundColor(gui_baseCol);
}