Qt: More cleanup
Jeffrey Pfau jeffrey@endrift.com
Mon, 10 Aug 2015 23:04:39 -0700
3 files changed,
3 insertions(+),
3 deletions(-)
M
src/platform/qt/LoadSaveState.cpp
→
src/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.cpp
→
src/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.cpp
→
src/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); });