all repos — mgba @ 597628736f16b9c60020662101cc54e5a7c2001f

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

597628736f16b9c60020662101cc54e5a7c2001f

parent

66842997dc50540c59f9f079aa903ab996fa3172

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

jump to
M CHANGESCHANGES

@@ -56,6 +56,7 @@ - Qt: Force OpenGL paint engine creation thread (fixes mgba.io/i/1642)

- 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
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(); -}+}