Qt: Fix Battle Chip view not displaying chips on some DPI settings

This commit is contained in:
Vicki Pfau 2020-08-21 22:17:16 -07:00
parent 66842997dc
commit 597628736f
2 changed files with 5 additions and 1 deletions

View File

@ -56,6 +56,7 @@ Other fixes:
- Qt: Fix static compilation in MinGW (fixes mgba.io/i/1769)
- Qt: Fix a race condition in the frame inspector
- Qt: Add dummy English translation file (fixes mgba.io/i/1469)
- Qt: Fix Battle Chip view not displaying chips on some DPI settings
- mGUI: Fix closing down a game if an exit is signalled
- mVL: Fix injecting accidentally draining non-injection buffer
- SM83: Simplify register pair access on big endian

View File

@ -42,6 +42,9 @@ BattleChipView::BattleChipView(std::shared_ptr<CoreController> controller, Windo
#else
int size = QFontMetrics(QFont()).height() / (devicePixelRatio() * 12);
#endif
if (!size) {
size = 1;
}
m_ui.chipList->setIconSize(m_ui.chipList->iconSize() * size);
m_ui.chipList->setGridSize(m_ui.chipList->gridSize() * size);
m_model.setScale(size);
@ -259,4 +262,4 @@ void BattleChipView::updateData() {
m_updater = nullptr;
});
m_updater->downloadUpdate();
}
}