Fixed GUI textfield and dropdown heights, for SDL1

This commit is contained in:
Dimitris Panokostas 2017-12-17 22:51:13 +01:00
parent a5696b2703
commit 107c8708fb
4 changed files with 11 additions and 11 deletions

View file

@ -249,7 +249,7 @@ bool LoadConfigByName(const char *name)
lblName->setSize(lblName->getWidth(), lblName->getHeight()); lblName->setSize(lblName->getWidth(), lblName->getHeight());
lblName->setAlignment(gcn::Graphics::RIGHT); lblName->setAlignment(gcn::Graphics::RIGHT);
txtName = new gcn::TextField(); txtName = new gcn::TextField();
txtName->setSize(300, txtName->getHeight()); txtName->setSize(300, TEXTFIELD_HEIGHT);
txtName->setId("ConfigName"); txtName->setId("ConfigName");
txtName->setBackgroundColor(colTextboxBackground); txtName->setBackgroundColor(colTextboxBackground);
@ -257,7 +257,7 @@ bool LoadConfigByName(const char *name)
lblDesc->setSize(lblDesc->getWidth(), lblDesc->getHeight()); lblDesc->setSize(lblDesc->getWidth(), lblDesc->getHeight());
lblDesc->setAlignment(gcn::Graphics::RIGHT); lblDesc->setAlignment(gcn::Graphics::RIGHT);
txtDesc = new gcn::TextField(); txtDesc = new gcn::TextField();
txtDesc->setSize(300, txtDesc->getHeight()); txtDesc->setSize(300, TEXTFIELD_HEIGHT);
txtDesc->setId("ConfigDesc"); txtDesc->setId("ConfigDesc");
txtDesc->setBackgroundColor(colTextboxBackground); txtDesc->setBackgroundColor(colTextboxBackground);

View file

@ -233,7 +233,7 @@ void InitPanelMisc(const struct _ConfigCategory& category)
lblOpenGUI->setAlignment(gcn::Graphics::RIGHT); lblOpenGUI->setAlignment(gcn::Graphics::RIGHT);
txtOpenGUI = new gcn::TextField(); txtOpenGUI = new gcn::TextField();
txtOpenGUI->setEnabled(false); txtOpenGUI->setEnabled(false);
txtOpenGUI->setSize(85, txtOpenGUI->getHeight()); txtOpenGUI->setSize(85, TEXTFIELD_HEIGHT);
txtOpenGUI->setBackgroundColor(colTextboxBackground); txtOpenGUI->setBackgroundColor(colTextboxBackground);
cmdOpenGUI = new gcn::Button("..."); cmdOpenGUI = new gcn::Button("...");
cmdOpenGUI->setId("OpenGUI"); cmdOpenGUI->setId("OpenGUI");
@ -245,7 +245,7 @@ void InitPanelMisc(const struct _ConfigCategory& category)
lblKeyForQuit->setAlignment(gcn::Graphics::RIGHT); lblKeyForQuit->setAlignment(gcn::Graphics::RIGHT);
txtKeyForQuit = new gcn::TextField(); txtKeyForQuit = new gcn::TextField();
txtKeyForQuit->setEnabled(false); txtKeyForQuit->setEnabled(false);
txtKeyForQuit->setSize(85, txtKeyForQuit->getHeight()); txtKeyForQuit->setSize(85, TEXTFIELD_HEIGHT);
txtKeyForQuit->setBackgroundColor(colTextboxBackground); txtKeyForQuit->setBackgroundColor(colTextboxBackground);
cmdKeyForQuit = new gcn::Button("..."); cmdKeyForQuit = new gcn::Button("...");
cmdKeyForQuit->setId("KeyForQuit"); cmdKeyForQuit->setId("KeyForQuit");

View file

@ -119,7 +119,7 @@ void InitPanelPaths(const struct _ConfigCategory& category)
lblSystemROMs = new gcn::Label("System ROMs:"); lblSystemROMs = new gcn::Label("System ROMs:");
txtSystemROMs = new gcn::TextField(); txtSystemROMs = new gcn::TextField();
txtSystemROMs->setSize(textFieldWidth, txtSystemROMs->getHeight()); txtSystemROMs->setSize(textFieldWidth, TEXTFIELD_HEIGHT);
txtSystemROMs->setBackgroundColor(colTextboxBackground); txtSystemROMs->setBackgroundColor(colTextboxBackground);
cmdSystemROMs = new gcn::Button("..."); cmdSystemROMs = new gcn::Button("...");
@ -130,7 +130,7 @@ void InitPanelPaths(const struct _ConfigCategory& category)
lblConfigPath = new gcn::Label("Configuration files:"); lblConfigPath = new gcn::Label("Configuration files:");
txtConfigPath = new gcn::TextField(); txtConfigPath = new gcn::TextField();
txtConfigPath->setSize(textFieldWidth, txtConfigPath->getHeight()); txtConfigPath->setSize(textFieldWidth, TEXTFIELD_HEIGHT);
txtConfigPath->setBackgroundColor(colTextboxBackground); txtConfigPath->setBackgroundColor(colTextboxBackground);
cmdConfigPath = new gcn::Button("..."); cmdConfigPath = new gcn::Button("...");
@ -141,7 +141,7 @@ void InitPanelPaths(const struct _ConfigCategory& category)
lblControllersPath = new gcn::Label("Controller files:"); lblControllersPath = new gcn::Label("Controller files:");
txtControllersPath = new gcn::TextField(); txtControllersPath = new gcn::TextField();
txtControllersPath->setSize(textFieldWidth, txtControllersPath->getHeight()); txtControllersPath->setSize(textFieldWidth, TEXTFIELD_HEIGHT);
txtControllersPath->setBackgroundColor(colTextboxBackground); txtControllersPath->setBackgroundColor(colTextboxBackground);
cmdControllersPath = new gcn::Button("..."); cmdControllersPath = new gcn::Button("...");
@ -152,7 +152,7 @@ void InitPanelPaths(const struct _ConfigCategory& category)
lblRetroArchFile = new gcn::Label("RetroArch configuration file (retroarch.cfg):"); lblRetroArchFile = new gcn::Label("RetroArch configuration file (retroarch.cfg):");
txtRetroArchFile = new gcn::TextField(); txtRetroArchFile = new gcn::TextField();
txtRetroArchFile->setSize(textFieldWidth, txtRetroArchFile->getHeight()); txtRetroArchFile->setSize(textFieldWidth, TEXTFIELD_HEIGHT);
txtRetroArchFile->setBackgroundColor(colTextboxBackground); txtRetroArchFile->setBackgroundColor(colTextboxBackground);
cmdRetroArchFile = new gcn::Button("..."); cmdRetroArchFile = new gcn::Button("...");

View file

@ -13,9 +13,9 @@
#define SMALL_BUTTON_WIDTH 30 #define SMALL_BUTTON_WIDTH 30
#define SMALL_BUTTON_HEIGHT 22 #define SMALL_BUTTON_HEIGHT 22
#define LABEL_HEIGHT 15 #define LABEL_HEIGHT 15
#define TEXTFIELD_HEIGHT 16 #define TEXTFIELD_HEIGHT 20
#define DROPDOWN_HEIGHT 15 #define DROPDOWN_HEIGHT 20
#define SLIDER_HEIGHT 18 #define SLIDER_HEIGHT 20
#define TITLEBAR_HEIGHT 24 #define TITLEBAR_HEIGHT 24
#ifdef USE_SDL2 #ifdef USE_SDL2
#include <guisan/sdl/sdlinput.hpp> #include <guisan/sdl/sdlinput.hpp>