all repos — mgba @ 50005e0703fe9d6827875f4b2f870895e4033d0e

mGBA Game Boy Advance Emulator

Qt: More cleanup
Jeffrey Pfau jeffrey@endrift.com
Mon, 10 Aug 2015 23:04:39 -0700
commit

50005e0703fe9d6827875f4b2f870895e4033d0e

parent

1929047896659a90d64858eb3a90c186a14d996d

M src/platform/qt/LoadSaveState.cppsrc/platform/qt/LoadSaveState.cpp

@@ -26,6 +26,7 @@ , m_controller(controller)

, m_currentFocus(controller->stateSlot() - 1) , m_mode(LoadSave::LOAD) { + setAttribute(Qt::WA_TranslucentBackground); m_ui.setupUi(this); m_slots[0] = m_ui.state1;

@@ -208,6 +209,5 @@

void LoadSaveState::paintEvent(QPaintEvent*) { QPainter painter(this); QRect full(QPoint(), size()); - painter.drawPixmap(full, m_currentImage); painter.fillRect(full, QColor(0, 0, 0, 128)); }
M src/platform/qt/SavestateButton.cppsrc/platform/qt/SavestateButton.cpp

@@ -13,7 +13,7 @@

SavestateButton::SavestateButton(QWidget* parent) : QAbstractButton(parent) { - // Nothing to do + setAttribute(Qt::WA_TranslucentBackground); } void SavestateButton::paintEvent(QPaintEvent*) {
M src/platform/qt/Window.cppsrc/platform/qt/Window.cpp

@@ -685,7 +685,7 @@ m_stateWindow = new LoadSaveState(m_controller);

connect(this, SIGNAL(shutdown()), m_stateWindow, SLOT(close())); connect(m_controller, SIGNAL(gameStopped(GBAThread*)), m_stateWindow, SLOT(close())); connect(m_stateWindow, &LoadSaveState::closed, [this]() { - m_screenWidget->layout()->removeWidget(m_stateWindow); + detachWidget(m_stateWindow); m_stateWindow = nullptr; QMetaObject::invokeMethod(this, "setFocus", Qt::QueuedConnection); });