From fc64b9a64f4116e5735120eab107381d9481091c Mon Sep 17 00:00:00 2001 From: The Dax Date: Sun, 20 Oct 2013 00:36:05 -0400 Subject: [PATCH] Make the text and images centered. --- UI/TouchControlVisibilityScreen.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/UI/TouchControlVisibilityScreen.cpp b/UI/TouchControlVisibilityScreen.cpp index c7593bc128..dd3932942e 100644 --- a/UI/TouchControlVisibilityScreen.cpp +++ b/UI/TouchControlVisibilityScreen.cpp @@ -73,11 +73,16 @@ void TouchControlVisibilityScreen::CreateViews() { row->Add(new CheckBox(i->second, "", "", new LinearLayoutParams(50, WRAP_CONTENT))); imageFinder = keyImages.find(i->first); - + Choice *choice; + if (imageFinder != keyImages.end()) { - row->Add(new Choice(keyImages[imageFinder->first], new LinearLayoutParams(1.0f))); + choice = new Choice(keyImages[imageFinder->first], new LinearLayoutParams(1.0f)); + choice->SetCentered(true); + row->Add(choice); } else { - row->Add(new Choice(mc->T(i->first.c_str()), new LinearLayoutParams(1.0f))); + choice = new Choice(mc->T(i->first.c_str()), new LinearLayoutParams(1.0f)); + choice->SetCentered(true); + row->Add(choice); } grid->Add(row); }