all repos — mgba @ a1dfd69c062a1741d2e783b2c34fd49a863119a0

mGBA Game Boy Advance Emulator

Qt: Fix Battle Chip view not displaying chips on some DPI settings
Vicki Pfau vi@endrift.com
Fri, 21 Aug 2020 22:17:16 -0700
commit

a1dfd69c062a1741d2e783b2c34fd49a863119a0

parent

59b48aaadec8c682a9319222043d36288d26e16f

2 files changed, 5 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -16,6 +16,7 @@ - GBA: Disable more checks when loading GS save with checks disabled (fixes mgba.io/i/1851)

- GBA: Fix endianness issues in renderer proxy - GBA Core: Fix memory leak when loading symbols - 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 - VFS: Fix directory node listing on some filesystems
M src/platform/qt/BattleChipView.cppsrc/platform/qt/BattleChipView.cpp

@@ -42,6 +42,9 @@ int size = QFontMetrics(QFont()).height() / ((int) ceil(devicePixelRatioF()) * 12);

#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 @@ delete m_updater;

m_updater = nullptr; }); m_updater->downloadUpdate(); -}+}