Merge pull request #6750 from spycrab/qt_render_widget
Qt: Fix multiple RenderWidget issues
This commit is contained in:
commit
2588b5e40e
|
@ -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 @@ private:
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue