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

View file

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

View file

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

View file

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