From 37a564da4c34ec84f95a1224e5f5fc1161176184 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Tue, 30 Apr 2019 18:16:44 -0700 Subject: [PATCH] Qt: Fix adjusting magnification in tile viewer when not fitting to window --- CHANGES | 1 + src/platform/qt/TileView.cpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index d5d08b3e5..049717040 100644 --- a/CHANGES +++ b/CHANGES @@ -33,6 +33,7 @@ Other fixes: - GB Core: Fix toggling WIN and OBJ being swapped - All: Fix several memory leaks - LR35902: Fix trailing whitespace in disassembly + - Qt: Fix adjusting magnification in tile viewer when not fitting to window Misc: - GBA Savedata: EEPROM performance fixes - GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash diff --git a/src/platform/qt/TileView.cpp b/src/platform/qt/TileView.cpp index bc7381f7a..01673c9df 100644 --- a/src/platform/qt/TileView.cpp +++ b/src/platform/qt/TileView.cpp @@ -65,7 +65,10 @@ TileView::TileView(std::shared_ptr controller, QWidget* parent) } updateTiles(true); }); - connect(m_ui.magnification, static_cast(&QSpinBox::valueChanged), [this]() { + connect(m_ui.magnification, static_cast(&QSpinBox::valueChanged), [this](int mag) { + if (!m_ui.tileFit->isChecked()) { + m_ui.tiles->setMinimumSize(mag * 8 * m_ui.tilesPerRow->value(), m_ui.tiles->minimumSize().height()); + } updateTiles(true); });