From b89af62143515e08f3f1af576c5a73aad93f2d91 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Sat, 17 Aug 2013 13:08:32 +0200 Subject: [PATCH] Fix the settings screen layout so the back button is always visible --- UI/GameSettingsScreen.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 26baeabdd..dbff627b8 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -186,17 +186,14 @@ void GameSettingsScreen::CreateViews() { I18NCategory *s = GetI18NCategory("System"); I18NCategory *ms = GetI18NCategory("MainSettings"); - Margins actionMenuMargins(0, 0, 15, 0); - - root_ = new LinearLayout(ORIENT_HORIZONTAL); + root_ = new AnchorLayout(new LayoutParams(FILL_PARENT, FILL_PARENT)); ViewGroup *leftColumn = new AnchorLayout(new LinearLayoutParams(1.0f)); root_->Add(leftColumn); - leftColumn->Add(new Spacer(new LinearLayoutParams(1.0))); - leftColumn->Add(new Choice(g->T("Back"), "", false, new AnchorLayoutParams(150, WRAP_CONTENT, 10, NONE, NONE, 10)))->OnClick.Handle(this, &GameSettingsScreen::OnBack); + root_->Add(new Choice(g->T("Back"), "", false, new AnchorLayoutParams(150, WRAP_CONTENT, 10, NONE, NONE, 10)))->OnClick.Handle(this, &GameSettingsScreen::OnBack); - TabHolder *tabHolder = new TabHolder(ORIENT_VERTICAL, 200, new LinearLayoutParams(800, FILL_PARENT, actionMenuMargins)); + TabHolder *tabHolder = new TabHolder(ORIENT_VERTICAL, 200, new AnchorLayoutParams(10, 0, 10, 0, false)); root_->Add(tabHolder);