mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-10 22:49:00 +01:00
DolphinWX: Disable 'maker' column hiding
This was done because showing a column was broken: Showing a column repopulates the column with no regard for the sorted order. This results in a seemingly random order. (actually the order of m_ISO_FILES)
This commit is contained in:
parent
e4759bcbcb
commit
4cd918caf1
@ -1338,84 +1338,30 @@ void CGameListCtrl::AutomaticColumnWidth()
|
|||||||
+ GetColumnWidth(COLUMN_SIZE)
|
+ GetColumnWidth(COLUMN_SIZE)
|
||||||
+ GetColumnWidth(COLUMN_EMULATION_STATE));
|
+ GetColumnWidth(COLUMN_EMULATION_STATE));
|
||||||
|
|
||||||
// We hide the Maker column if the window is too small
|
if (SConfig::GetInstance().m_showMakerColumn &&
|
||||||
// Use ShowColumn() instead of SetColumnWidth because
|
SConfig::GetInstance().m_showFileNameColumn)
|
||||||
// the maker column may have been autohidden and the
|
|
||||||
// therefore the content needs to be restored.
|
|
||||||
if (resizable > 425)
|
|
||||||
{
|
{
|
||||||
if (SConfig::GetInstance().m_showMakerColumn &&
|
SetColumnWidth(COLUMN_TITLE, resizable / 3);
|
||||||
SConfig::GetInstance().m_showFileNameColumn)
|
SetColumnWidth(COLUMN_MAKER, resizable / 3);
|
||||||
{
|
SetColumnWidth(COLUMN_FILENAME, resizable / 3);
|
||||||
SetColumnWidth(COLUMN_TITLE, resizable / 3);
|
}
|
||||||
ShowColumn(COLUMN_MAKER, resizable / 3);
|
else if (SConfig::GetInstance().m_showMakerColumn)
|
||||||
SetColumnWidth(COLUMN_FILENAME, resizable / 3);
|
{
|
||||||
}
|
SetColumnWidth(COLUMN_TITLE, resizable / 2);
|
||||||
else if (SConfig::GetInstance().m_showMakerColumn)
|
SetColumnWidth(COLUMN_MAKER, resizable / 2);
|
||||||
{
|
}
|
||||||
SetColumnWidth(COLUMN_TITLE, resizable / 2);
|
else if (SConfig::GetInstance().m_showFileNameColumn)
|
||||||
ShowColumn(COLUMN_MAKER, resizable / 2);
|
{
|
||||||
}
|
SetColumnWidth(COLUMN_TITLE, resizable / 2);
|
||||||
else if (SConfig::GetInstance().m_showFileNameColumn)
|
SetColumnWidth(COLUMN_FILENAME, resizable / 2);
|
||||||
{
|
|
||||||
SetColumnWidth(COLUMN_TITLE, resizable / 2);
|
|
||||||
SetColumnWidth(COLUMN_FILENAME, resizable / 2);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SetColumnWidth(COLUMN_TITLE, resizable);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (SConfig::GetInstance().m_showFileNameColumn)
|
SetColumnWidth(COLUMN_TITLE, resizable);
|
||||||
{
|
|
||||||
SetColumnWidth(COLUMN_TITLE, resizable / 2);
|
|
||||||
SetColumnWidth(COLUMN_FILENAME, resizable / 2);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SetColumnWidth(COLUMN_TITLE, resizable);
|
|
||||||
}
|
|
||||||
HideColumn(COLUMN_MAKER);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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++)
|
|
||||||
{
|
|
||||||
UpdateItemAtColumn(i, column);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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()
|
void CGameListCtrl::UnselectAll()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < GetItemCount(); i++)
|
for (int i = 0; i < GetItemCount(); i++)
|
||||||
|
@ -105,8 +105,6 @@ private:
|
|||||||
|
|
||||||
void CompressSelection(bool _compress);
|
void CompressSelection(bool _compress);
|
||||||
void AutomaticColumnWidth();
|
void AutomaticColumnWidth();
|
||||||
void ShowColumn(int column, int width);
|
|
||||||
void HideColumn(int column);
|
|
||||||
void UnselectAll();
|
void UnselectAll();
|
||||||
|
|
||||||
static bool CompressCB(const std::string& text, float percent, void* arg);
|
static bool CompressCB(const std::string& text, float percent, void* arg);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user