summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorMathew Maidment <mathew1800@gmail.com>2016-04-21 09:15:10 -0400
committerMathew Maidment <mathew1800@gmail.com>2016-04-21 09:15:10 -0400
commitbdb9da21041fdcefa4504c28259647eea910e36c (patch)
treeb958b88be6c2603744c87facd8af9053deb174a4 /Source
parentaebff2c16190fa5c8bedc1923fd71218b10bf022 (diff)
parent4cd918caf15e75bd93a8ad9c9a7a0d3135452782 (diff)
Merge pull request #3687 from rukai/fixMakerColumn
DolphinWX: Disable 'maker' column hiding
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/DolphinWX/GameListCtrl.cpp84
-rw-r--r--Source/Core/DolphinWX/GameListCtrl.h2
2 files changed, 15 insertions, 71 deletions
diff --git a/Source/Core/DolphinWX/GameListCtrl.cpp b/Source/Core/DolphinWX/GameListCtrl.cpp
index 7ca7968ab8..d994a5b5e2 100644
--- a/Source/Core/DolphinWX/GameListCtrl.cpp
+++ b/Source/Core/DolphinWX/GameListCtrl.cpp
@@ -1338,82 +1338,28 @@ void CGameListCtrl::AutomaticColumnWidth()
+ GetColumnWidth(COLUMN_SIZE)
+ GetColumnWidth(COLUMN_EMULATION_STATE));
- // We hide the Maker column if the window is too small
- // Use ShowColumn() instead of SetColumnWidth because
- // the maker column may have been autohidden and the
- // therefore the content needs to be restored.
- if (resizable > 425)
+ if (SConfig::GetInstance().m_showMakerColumn &&
+ SConfig::GetInstance().m_showFileNameColumn)
{
- if (SConfig::GetInstance().m_showMakerColumn &&
- SConfig::GetInstance().m_showFileNameColumn)
- {
- SetColumnWidth(COLUMN_TITLE, resizable / 3);
- ShowColumn(COLUMN_MAKER, resizable / 3);
- SetColumnWidth(COLUMN_FILENAME, resizable / 3);
- }
- else if (SConfig::GetInstance().m_showMakerColumn)
- {
- SetColumnWidth(COLUMN_TITLE, resizable / 2);
- ShowColumn(COLUMN_MAKER, resizable / 2);
- }
- else if (SConfig::GetInstance().m_showFileNameColumn)
- {
- SetColumnWidth(COLUMN_TITLE, resizable / 2);
- SetColumnWidth(COLUMN_FILENAME, resizable / 2);
- }
- else
- {
- SetColumnWidth(COLUMN_TITLE, resizable);
- }
+ SetColumnWidth(COLUMN_TITLE, resizable / 3);
+ SetColumnWidth(COLUMN_MAKER, resizable / 3);
+ SetColumnWidth(COLUMN_FILENAME, resizable / 3);
}
- else
+ else if (SConfig::GetInstance().m_showMakerColumn)
{
- if (SConfig::GetInstance().m_showFileNameColumn)
- {
- SetColumnWidth(COLUMN_TITLE, resizable / 2);
- SetColumnWidth(COLUMN_FILENAME, resizable / 2);
- }
- else
- {
- SetColumnWidth(COLUMN_TITLE, resizable);
- }
- HideColumn(COLUMN_MAKER);
+ SetColumnWidth(COLUMN_TITLE, resizable / 2);
+ SetColumnWidth(COLUMN_MAKER, resizable / 2);
}
- }
-}
-
-// Fills a previously hidden column with items. Acts
-// as a SetColumnWidth if width is nonzero.
-void CGameListCtrl::ShowColumn(int column, int width)
-{
- // Fill the column with items if it was hidden
- if (GetColumnWidth(column) == 0)
- {
- for (int i = 0; i < GetItemCount(); i++)
+ else if (SConfig::GetInstance().m_showFileNameColumn)
{
- UpdateItemAtColumn(i, column);
+ SetColumnWidth(COLUMN_TITLE, resizable / 2);
+ SetColumnWidth(COLUMN_FILENAME, resizable / 2);
+ }
+ else
+ {
+ SetColumnWidth(COLUMN_TITLE, resizable);
}
}
- SetColumnWidth(column, width);
-}
-
-// Hide the passed column from the gamelist.
-// It is not enough to set the width to zero because this leads to
-// graphical glitches where the content of the hidden column is
-// squeezed into the next column. Therefore we need to clear the
-// items, too.
-void CGameListCtrl::HideColumn(int column)
-{
- // Do nothing if the column is already hidden
- if (GetColumnWidth(column) == 0)
- return;
-
- // Remove the items from the column
- for (int i = 0; i < GetItemCount(); i++)
- {
- SetItem(i, column, "", -1);
- }
- SetColumnWidth(column, 0);
}
void CGameListCtrl::UnselectAll()
diff --git a/Source/Core/DolphinWX/GameListCtrl.h b/Source/Core/DolphinWX/GameListCtrl.h
index dcf9d58ad3..328b69747c 100644
--- a/Source/Core/DolphinWX/GameListCtrl.h
+++ b/Source/Core/DolphinWX/GameListCtrl.h
@@ -105,8 +105,6 @@ private:
void CompressSelection(bool _compress);
void AutomaticColumnWidth();
- void ShowColumn(int column, int width);
- void HideColumn(int column);
void UnselectAll();
static bool CompressCB(const std::string& text, float percent, void* arg);