From 9ba145419faa46b85baf5982f0c62ab76268b0af Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 12 Aug 2012 15:16:27 +0200 Subject: GUI: Mark parts of the grid based chooser layout code as HACK. --- gui/saveload-dialog.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index 8e214bce90..d1a66dc28a 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -620,6 +620,8 @@ void SaveLoadChooserGrid::open() { } void SaveLoadChooserGrid::reflowLayout() { + // HACK: The page display is not available in low resolution layout. We + // remove and readd the widget here to avoid our GUI from erroring out. removeWidget(_pageDisplay); if (g_gui.xmlEval()->getVar("Globals.ShowChooserPageDisplay") == 1) { _pageDisplay->init(); @@ -628,6 +630,8 @@ void SaveLoadChooserGrid::reflowLayout() { SaveLoadChooserDialog::reflowLayout(); destroyButtons(); + // HACK: The whole code below really works around the fact, that we have + // no easy way to dynamically layout widgets. const uint16 availableWidth = getWidth() - 20; uint16 availableHeight; -- cgit v1.2.3