mirror of https://github.com/mgba-emu/mgba.git
Qt: Map Viewer touchups
This commit is contained in:
parent
13e1f988c9
commit
6e9507f082
|
@ -65,7 +65,11 @@ void MapView::selectMap(int map) {
|
|||
if (map >= mMapCacheSetSize(&m_cacheSet->maps)) {
|
||||
return;
|
||||
}
|
||||
if (map == m_map) {
|
||||
return;
|
||||
}
|
||||
m_map = map;
|
||||
updateTiles(true);
|
||||
}
|
||||
|
||||
#ifdef M_CORE_GBA
|
||||
|
@ -88,7 +92,11 @@ void MapView::updateTilesGBA(bool force) {
|
|||
}
|
||||
}
|
||||
bg = bg.convertToFormat(QImage::Format_RGB32).rgbSwapped();
|
||||
m_ui.map->setPixmap(QPixmap::fromImage(bg));
|
||||
QPixmap map = QPixmap::fromImage(bg);
|
||||
if (m_ui.magnification->value() > 1) {
|
||||
map = map.scaled(map.size() * m_ui.magnification->value());
|
||||
}
|
||||
m_ui.map->setPixmap(map);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -32,6 +32,18 @@
|
|||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="map">
|
||||
<property name="text">
|
||||
|
@ -39,6 +51,19 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
|
Loading…
Reference in New Issue