From 452cc6b69f93d85a36a607e8fb23065d7c6ebdc4 Mon Sep 17 00:00:00 2001 From: spycrab Date: Fri, 4 May 2018 14:04:46 +0200 Subject: [PATCH 1/2] Qt/RenderWidget: Show proper icon and title --- Source/Core/DolphinQt2/RenderWidget.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/Core/DolphinQt2/RenderWidget.cpp b/Source/Core/DolphinQt2/RenderWidget.cpp index 0d82a40372..3865968fe1 100644 --- a/Source/Core/DolphinQt2/RenderWidget.cpp +++ b/Source/Core/DolphinQt2/RenderWidget.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -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); From 7d762fd63282e90a8da05a2d87fa78ad712b3ea9 Mon Sep 17 00:00:00 2001 From: spycrab Date: Fri, 4 May 2018 14:14:53 +0200 Subject: [PATCH 2/2] Qt/RenderWidget: Restore size when exiting fullscreen --- Source/Core/DolphinQt2/MainWindow.cpp | 7 ++++++- Source/Core/DolphinQt2/MainWindow.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinQt2/MainWindow.cpp b/Source/Core/DolphinQt2/MainWindow.cpp index de05df1602..df6b3c5dea 100644 --- a/Source/Core/DolphinQt2/MainWindow.cpp +++ b/Source/Core/DolphinQt2/MainWindow.cpp @@ -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); } } diff --git a/Source/Core/DolphinQt2/MainWindow.h b/Source/Core/DolphinQt2/MainWindow.h index c654dfb538..6cb3ea2502 100644 --- a/Source/Core/DolphinQt2/MainWindow.h +++ b/Source/Core/DolphinQt2/MainWindow.h @@ -191,4 +191,5 @@ private: RegisterWidget* m_register_widget; WatchWidget* m_watch_widget; CheatsManager* m_cheats_manager; + QSize m_render_widget_size{640, 480}; };