From e04be02c6ceca54661f3cc9ad011ca68b81388ba Mon Sep 17 00:00:00 2001 From: Dimitris Panokostas Date: Mon, 25 Dec 2017 02:00:11 +0100 Subject: [PATCH] Improved positioning and sizing in some panels --- src/osdep/gui/PanelCustom.cpp | 24 ++++++++++++------------ src/osdep/gui/PanelDisplay.cpp | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/osdep/gui/PanelCustom.cpp b/src/osdep/gui/PanelCustom.cpp index 71a779eb..e83149e9 100644 --- a/src/osdep/gui/PanelCustom.cpp +++ b/src/osdep/gui/PanelCustom.cpp @@ -446,21 +446,21 @@ void InitPanelCustom(const struct _ConfigCategory& category) txtPortInput->setSize(grpFunction->getWidth() - (lblPortInput->getWidth() + DISTANCE_NEXT_X * 2 + lblRetroarch->getWidth()), TEXTFIELD_HEIGHT); - lblCustomAction[0] = new gcn::Label("D-Pad Up:"); - lblCustomAction[1] = new gcn::Label("D-Pad Down:"); - lblCustomAction[2] = new gcn::Label("D-Pad Left:"); - lblCustomAction[3] = new gcn::Label("D-Pad Right:"); + lblCustomAction[0] = new gcn::Label("DPad Up:"); + lblCustomAction[1] = new gcn::Label("DPad Down:"); + lblCustomAction[2] = new gcn::Label("DPad Left:"); + lblCustomAction[3] = new gcn::Label("DPad Right:"); lblCustomAction[4] = new gcn::Label("Select:"); - lblCustomAction[5] = new gcn::Label("Left Shoulder:"); - lblCustomAction[6] = new gcn::Label("Left Analog:"); + lblCustomAction[5] = new gcn::Label("L.Shoulder:"); + lblCustomAction[6] = new gcn::Label("L.Analog:"); lblCustomAction[7] = new gcn::Label("North:"); lblCustomAction[8] = new gcn::Label("South:"); lblCustomAction[9] = new gcn::Label("East:"); lblCustomAction[10] = new gcn::Label("West:"); lblCustomAction[11] = new gcn::Label("Start:"); - lblCustomAction[12] = new gcn::Label("Right Shoulder:"); - lblCustomAction[13] = new gcn::Label("Right Analog:"); + lblCustomAction[12] = new gcn::Label("R.Shoulder:"); + lblCustomAction[13] = new gcn::Label("R.Analog:"); for (i = 0; i < 14; ++i) { @@ -468,7 +468,7 @@ void InitPanelCustom(const struct _ConfigCategory& category) lblCustomAction[i]->setAlignment(gcn::Graphics::RIGHT); cboCustomAction[i] = new gcn::UaeDropDown(&CustomEventList); - cboCustomAction[i]->setSize(cboCustomAction[i]->getWidth(), DROPDOWN_HEIGHT); + cboCustomAction[i]->setSize(cboCustomAction[i]->getWidth()*2, DROPDOWN_HEIGHT); cboCustomAction[i]->setBaseColor(gui_baseCol); cboCustomAction[i]->setBackgroundColor(colTextboxBackground); @@ -480,8 +480,8 @@ void InitPanelCustom(const struct _ConfigCategory& category) auto posY = 144 + 40; for (i = 0; i < 7; ++i) { - category.panel->add(lblCustomAction[i], DISTANCE_BORDER, posY); - category.panel->add(cboCustomAction[i], DISTANCE_BORDER + lblCustomAction[i]->getWidth() + 8, posY); + category.panel->add(lblCustomAction[i], DISTANCE_BORDER/2, posY); + category.panel->add(cboCustomAction[i], DISTANCE_BORDER/2 + lblCustomAction[i]->getWidth() + 4, posY); posY = posY + DROPDOWN_HEIGHT + 6; } @@ -490,7 +490,7 @@ void InitPanelCustom(const struct _ConfigCategory& category) for (i = 7; i < 14; ++i) { category.panel->add(lblCustomAction[i], DISTANCE_BORDER + 290, posY); - category.panel->add(cboCustomAction[i], DISTANCE_BORDER + lblCustomAction[i]->getWidth() + 290 + 8, posY); + category.panel->add(cboCustomAction[i], DISTANCE_BORDER + lblCustomAction[i]->getWidth() + 290 + 4, posY); posY = posY + DROPDOWN_HEIGHT + 6; } diff --git a/src/osdep/gui/PanelDisplay.cpp b/src/osdep/gui/PanelDisplay.cpp index 108c07e4..6759f406 100644 --- a/src/osdep/gui/PanelDisplay.cpp +++ b/src/osdep/gui/PanelDisplay.cpp @@ -221,7 +221,7 @@ void InitPanelDisplay(const struct _ConfigCategory& category) #endif grpAmigaScreen->setMovable(false); - grpAmigaScreen->setSize(lblVertPos->getX() + lblVertPos->getWidth() + sldVertPos->getX() + sldVertPos->getWidth() + lblVertPosInfo->getX() + lblVertPosInfo->getWidth() + DISTANCE_BORDER, posY + DISTANCE_BORDER); + grpAmigaScreen->setSize(lblVertPos->getX() + lblVertPos->getWidth() + sldVertPos->getWidth() + lblVertPosInfo->getX() + lblVertPosInfo->getWidth() + DISTANCE_BORDER, posY + DISTANCE_BORDER); grpAmigaScreen->setBaseColor(gui_baseCol); category.panel->add(grpAmigaScreen);