From 92d9ad4fe02f96c898db302b540dc66ad6aa48d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 11 Dec 2013 18:25:55 +0100 Subject: [PATCH] Always show zip files as full lines, to emphasize that they are different than working games. --- UI/MainScreen.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index bdcaff3f8d..4fbf8e62e2 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -443,9 +443,13 @@ void GameBrowser::Refresh() { if (allowBrowsing_) { fileInfo.clear(); path_.GetListing(fileInfo, "zip:rar:r01:"); - for (size_t i = 0; i < fileInfo.size(); i++) { - if (!fileInfo[i].isDirectory) { - gameButtons.push_back(new GameButton(fileInfo[i].fullName, *gridStyle_, new UI::LinearLayoutParams(*gridStyle_ == true ? UI::WRAP_CONTENT : UI::FILL_PARENT, UI::WRAP_CONTENT))); + if (!fileInfo.empty()) { + UI::LinearLayout *zl = new UI::LinearLayout(UI::ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)); + Add(zl); + for (size_t i = 0; i < fileInfo.size(); i++) { + if (!fileInfo[i].isDirectory) { + zl->Add(new GameButton(fileInfo[i].fullName, false, new UI::LinearLayoutParams(UI::FILL_PARENT, UI::WRAP_CONTENT))); + } } } }