mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix Battle Chip view not displaying chips on some DPI settings
This commit is contained in:
parent
59b48aaade
commit
a1dfd69c06
1
CHANGES
1
CHANGES
|
@ -16,6 +16,7 @@ Other fixes:
|
||||||
- GBA: Fix endianness issues in renderer proxy
|
- GBA: Fix endianness issues in renderer proxy
|
||||||
- GBA Core: Fix memory leak when loading symbols
|
- GBA Core: Fix memory leak when loading symbols
|
||||||
- Qt: Add dummy English translation file (fixes mgba.io/i/1469)
|
- 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
|
- mGUI: Fix closing down a game if an exit is signalled
|
||||||
- mVL: Fix injecting accidentally draining non-injection buffer
|
- mVL: Fix injecting accidentally draining non-injection buffer
|
||||||
- VFS: Fix directory node listing on some filesystems
|
- VFS: Fix directory node listing on some filesystems
|
||||||
|
|
|
@ -42,6 +42,9 @@ BattleChipView::BattleChipView(std::shared_ptr<CoreController> controller, Windo
|
||||||
#else
|
#else
|
||||||
int size = QFontMetrics(QFont()).height() / (devicePixelRatio() * 12);
|
int size = QFontMetrics(QFont()).height() / (devicePixelRatio() * 12);
|
||||||
#endif
|
#endif
|
||||||
|
if (!size) {
|
||||||
|
size = 1;
|
||||||
|
}
|
||||||
m_ui.chipList->setIconSize(m_ui.chipList->iconSize() * size);
|
m_ui.chipList->setIconSize(m_ui.chipList->iconSize() * size);
|
||||||
m_ui.chipList->setGridSize(m_ui.chipList->gridSize() * size);
|
m_ui.chipList->setGridSize(m_ui.chipList->gridSize() * size);
|
||||||
m_model.setScale(size);
|
m_model.setScale(size);
|
||||||
|
@ -259,4 +262,4 @@ void BattleChipView::updateData() {
|
||||||
m_updater = nullptr;
|
m_updater = nullptr;
|
||||||
});
|
});
|
||||||
m_updater->downloadUpdate();
|
m_updater->downloadUpdate();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue