@@ -37,6 +37,7 @@ static constexpr std::array<std::pair<ConsoleRegion, const char*>, 3> MEMORY_CAR
37
37
{ConsoleRegion::NTSC_J, " BI" },
38
38
{ConsoleRegion::PAL, " BE" },
39
39
}};
40
+ static constexpr int MEMORY_CARD_ICON_SIZE = 32 ;
40
41
static constexpr int MEMORY_CARD_ICON_FRAME_DURATION_MS = 200 ;
41
42
42
43
namespace {
@@ -141,8 +142,10 @@ MemoryCardEditorWindow::MemoryCardEditorWindow() : QWidget()
141
142
m_card_b.table = m_ui.cardB ;
142
143
m_card_b.blocks_free_label = m_ui.cardBUsage ;
143
144
144
- QtUtils::SetColumnWidthsForTableView (m_card_a.table , {32 , -1 , 155 , 45 });
145
- QtUtils::SetColumnWidthsForTableView (m_card_b.table , {32 , -1 , 155 , 45 });
145
+ m_file_icon_width = MEMORY_CARD_ICON_SIZE + style ()->pixelMetric (QStyle::PM_FocusFrameHMargin, nullptr , this );
146
+ m_file_icon_height = MEMORY_CARD_ICON_SIZE + style ()->pixelMetric (QStyle::PM_FocusFrameVMargin, nullptr , this );
147
+ QtUtils::SetColumnWidthsForTableView (m_card_a.table , {m_file_icon_width, -1 , 155 , 45 });
148
+ QtUtils::SetColumnWidthsForTableView (m_card_b.table , {m_file_icon_width, -1 , 155 , 45 });
146
149
147
150
createCardButtons (&m_card_a, m_ui.buttonBoxA );
148
151
createCardButtons (&m_card_b, m_ui.buttonBoxB );
@@ -381,6 +384,8 @@ void MemoryCardEditorWindow::updateCardTable(Card* card)
381
384
const int row = card->table ->rowCount ();
382
385
card->table ->insertRow (row);
383
386
387
+ card->table ->setRowHeight (row, m_file_icon_height);
388
+
384
389
QString title_str (QString::fromStdString (fi.title ));
385
390
if (fi.deleted )
386
391
title_str += tr (" (Deleted)" );
0 commit comments