Permalink
Browse files

Merge pull request #6750 from spycrab/qt_render_widget

Qt: Fix multiple RenderWidget issues
  • Loading branch information...
Helios747 committed May 6, 2018
2 parents 58b96ee + 7d762fd commit 2588b5e40e3de8571091418755803b9be4e79a78
@@ -619,9 +619,14 @@ void MainWindow::FullScreen()
bool was_fullscreen = m_render_widget->isFullScreen();
HideRenderWidget(false);
if (was_fullscreen)
{
ShowRenderWidget();
}
else
{
m_render_widget_size = m_render_widget->size();
m_render_widget->showFullScreen();
}
}
void MainWindow::ScreenShot()
@@ -691,7 +696,7 @@ void MainWindow::ShowRenderWidget()
m_rendering_to_main = false;
m_render_widget->showNormal();
m_render_widget->resize(640, 480);
m_render_widget->resize(m_render_widget_size);
}
}
@@ -191,4 +191,5 @@ class MainWindow final : public QMainWindow
RegisterWidget* m_register_widget;
WatchWidget* m_watch_widget;
CheatsManager* m_cheats_manager;
QSize m_render_widget_size{640, 480};
};
@@ -5,6 +5,7 @@
#include <QApplication>
#include <QDesktopWidget>
#include <QGuiApplication>
#include <QIcon>
#include <QKeyEvent>
#include <QMouseEvent>
#include <QPalette>
@@ -18,10 +19,14 @@
#include "DolphinQt2/Host.h"
#include "DolphinQt2/RenderWidget.h"
#include "DolphinQt2/Resources.h"
#include "DolphinQt2/Settings.h"
RenderWidget::RenderWidget(QWidget* parent) : QWidget(parent)
{
setWindowTitle(QStringLiteral("Dolphin"));
setWindowIcon(Resources::GetAppIcon());
QPalette p;
p.setColor(QPalette::Background, Qt::black);
setPalette(p);

0 comments on commit 2588b5e

Please sign in to comment.