mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 15:55:31 +01:00
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();
|
bool was_fullscreen = m_render_widget->isFullScreen();
|
||||||
HideRenderWidget(false);
|
HideRenderWidget(false);
|
||||||
if (was_fullscreen)
|
if (was_fullscreen)
|
||||||
|
{
|
||||||
ShowRenderWidget();
|
ShowRenderWidget();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
m_render_widget_size = m_render_widget->size();
|
||||||
m_render_widget->showFullScreen();
|
m_render_widget->showFullScreen();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::ScreenShot()
|
void MainWindow::ScreenShot()
|
||||||
@ -691,7 +696,7 @@ void MainWindow::ShowRenderWidget()
|
|||||||
m_rendering_to_main = false;
|
m_rendering_to_main = false;
|
||||||
|
|
||||||
m_render_widget->showNormal();
|
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;
|
RegisterWidget* m_register_widget;
|
||||||
WatchWidget* m_watch_widget;
|
WatchWidget* m_watch_widget;
|
||||||
CheatsManager* m_cheats_manager;
|
CheatsManager* m_cheats_manager;
|
||||||
|
QSize m_render_widget_size{640, 480};
|
||||||
};
|
};
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDesktopWidget>
|
#include <QDesktopWidget>
|
||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
|
#include <QIcon>
|
||||||
#include <QKeyEvent>
|
#include <QKeyEvent>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QPalette>
|
#include <QPalette>
|
||||||
@ -18,10 +19,14 @@
|
|||||||
|
|
||||||
#include "DolphinQt2/Host.h"
|
#include "DolphinQt2/Host.h"
|
||||||
#include "DolphinQt2/RenderWidget.h"
|
#include "DolphinQt2/RenderWidget.h"
|
||||||
|
#include "DolphinQt2/Resources.h"
|
||||||
#include "DolphinQt2/Settings.h"
|
#include "DolphinQt2/Settings.h"
|
||||||
|
|
||||||
RenderWidget::RenderWidget(QWidget* parent) : QWidget(parent)
|
RenderWidget::RenderWidget(QWidget* parent) : QWidget(parent)
|
||||||
{
|
{
|
||||||
|
setWindowTitle(QStringLiteral("Dolphin"));
|
||||||
|
setWindowIcon(Resources::GetAppIcon());
|
||||||
|
|
||||||
QPalette p;
|
QPalette p;
|
||||||
p.setColor(QPalette::Background, Qt::black);
|
p.setColor(QPalette::Background, Qt::black);
|
||||||
setPalette(p);
|
setPalette(p);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user