diff --git a/.ci/install-freebsd.sh b/.ci/install-freebsd.sh index 3f608d8a96..40da1f39df 100755 --- a/.ci/install-freebsd.sh +++ b/.ci/install-freebsd.sh @@ -12,7 +12,7 @@ pkg info # debug pkg install llvm12 # Mandatory dependencies (qt5-dbus and qt5-gui are pulled via qt5-widgets) -pkg install git ccache cmake ninja qt5-qmake qt5-buildtools qt5-widgets qt5-concurrent qt5-multimedia glew openal-soft ffmpeg +pkg install git ccache cmake ninja qt5-qmake qt5-buildtools qt5-widgets qt5-concurrent qt5-multimedia qt5-svg glew openal-soft ffmpeg # Optional dependencies (libevdev is pulled by qt5-gui) pkg install pkgconf alsa-lib pulseaudio sdl2 evdev-proto vulkan-headers vulkan-loader diff --git a/.ci/setup-windows.sh b/.ci/setup-windows.sh index 2513451f6e..571c964004 100755 --- a/.ci/setup-windows.sh +++ b/.ci/setup-windows.sh @@ -18,6 +18,7 @@ QT_WINE_URL="${QT_HOST}${QT_PREFIX}qtwinextras${QT_SUFFIX}" QT_DECL_URL="${QT_HOST}${QT_PREFIX}qtdeclarative${QT_SUFFIX}" QT_TOOL_URL="${QT_HOST}${QT_PREFIX}qttools${QT_SUFFIX}" QT_MM_URL="${QT_HOST}${QT_PREFIX}qtmultimedia${QT_SUFFIX}" +QT_SVG_URL="${QT_HOST}${QT_PREFIX}qtsvg${QT_SUFFIX}" LLVMLIBS_URL='https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win/llvmlibs_mt.7z' GLSLANG_URL='https://github.com/RPCS3/glslang/releases/download/custom-build-win/glslanglibs_mt.7z' VULKAN_SDK_URL="https://www.dropbox.com/s/fjlh97hrz0crqxv/VulkanSDK-1.2.182.0-Installer.exe" @@ -28,6 +29,7 @@ DEP_URLS=" \ $QT_DECL_URL \ $QT_TOOL_URL \ $QT_MM_URL \ + $QT_SVG_URL \ $LLVMLIBS_URL \ $GLSLANG_URL \ $VULKAN_SDK_URL" diff --git a/3rdparty/qt5.cmake b/3rdparty/qt5.cmake index 97a0003631..ed42399f97 100644 --- a/3rdparty/qt5.cmake +++ b/3rdparty/qt5.cmake @@ -2,17 +2,17 @@ add_library(3rdparty_qt5 INTERFACE) set(QT_MIN_VER 5.15.2) -find_package(Qt5 ${QT_MIN_VER} CONFIG COMPONENTS Widgets Concurrent Multimedia MultimediaWidgets) +find_package(Qt5 ${QT_MIN_VER} CONFIG COMPONENTS Widgets Concurrent Multimedia MultimediaWidgets Svg) if(WIN32) find_package(Qt5 ${QT_MIN_VER} COMPONENTS WinExtras REQUIRED) - target_link_libraries(3rdparty_qt5 INTERFACE Qt5::Widgets Qt5::WinExtras Qt5::Concurrent Qt5::Multimedia Qt5::MultimediaWidgets) + target_link_libraries(3rdparty_qt5 INTERFACE Qt5::Widgets Qt5::WinExtras Qt5::Concurrent Qt5::Multimedia Qt5::MultimediaWidgets Qt5::Svg) else() find_package(Qt5 ${QT_MIN_VER} COMPONENTS DBus Gui) if(Qt5DBus_FOUND) - target_link_libraries(3rdparty_qt5 INTERFACE Qt5::Widgets Qt5::DBus Qt5::Concurrent Qt5::Multimedia Qt5::MultimediaWidgets) + target_link_libraries(3rdparty_qt5 INTERFACE Qt5::Widgets Qt5::DBus Qt5::Concurrent Qt5::Multimedia Qt5::MultimediaWidgets Qt5::Svg) target_compile_definitions(3rdparty_qt5 INTERFACE -DHAVE_QTDBUS) else() - target_link_libraries(3rdparty_qt5 INTERFACE Qt5::Widgets Qt5::Concurrent Qt5::Multimedia Qt5::MultimediaWidgets) + target_link_libraries(3rdparty_qt5 INTERFACE Qt5::Widgets Qt5::Concurrent Qt5::Multimedia Qt5::MultimediaWidgets Qt5::Svg) endif() target_include_directories(3rdparty_qt5 INTERFACE ${Qt5Gui_PRIVATE_INCLUDE_DIRS}) endif() diff --git a/rpcs3/Icons/DualShock_3.svg b/rpcs3/Icons/DualShock_3.svg new file mode 100644 index 0000000000..4e66fe9933 --- /dev/null +++ b/rpcs3/Icons/DualShock_3.svg @@ -0,0 +1,36 @@ + + + + + + + + + +SELECT + +START + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rpcs3/Icons/controller.png b/rpcs3/Icons/controller.png deleted file mode 100644 index 0143102a0b..0000000000 Binary files a/rpcs3/Icons/controller.png and /dev/null differ diff --git a/rpcs3/Icons/insignia.png b/rpcs3/Icons/insignia.png deleted file mode 100644 index 83d68d0a7d..0000000000 Binary files a/rpcs3/Icons/insignia.png and /dev/null differ diff --git a/rpcs3/resources.qrc b/rpcs3/resources.qrc index 576a7b9e55..ebace85372 100644 --- a/rpcs3/resources.qrc +++ b/rpcs3/resources.qrc @@ -5,8 +5,6 @@ Icons/restart.png Icons/stop.png rpcs3.ico - Icons/controller.png - Icons/insignia.png Icons/configure.png Icons/controllers.png Icons/fullscreen.png @@ -17,5 +15,7 @@ Icons/open.png Icons/custom_config.png Icons/combo_config_bordered.png + rpcs3.svg + Icons/DualShock_3.svg diff --git a/rpcs3/rpcs3.vcxproj b/rpcs3/rpcs3.vcxproj index 3d92ffe7cf..88a79e5ba3 100644 --- a/rpcs3/rpcs3.vcxproj +++ b/rpcs3/rpcs3.vcxproj @@ -71,7 +71,7 @@ - ..\3rdparty\flatbuffers\include;..\3rdparty\wolfssl\wolfssl;..\3rdparty\curl\curl\include;..\3rdparty\libusb\libusb\libusb;$(VULKAN_SDK)\Include;..\3rdparty\XAudio2Redist\include;$(QTDIR)\include;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtCore;.\release;$(QTDIR)\mkspecs\win32-msvc2015;.\QTGeneratedFiles\$(ConfigurationName);.\QTGeneratedFiles;$(QTDIR)\include\QtWinExtras;$(QTDIR)\include\QtConcurrent;$(QTDIR)\include\QtMultimedia;$(QTDIR)\include\QtMultimediaWidgets;%(AdditionalIncludeDirectories) + ..\3rdparty\flatbuffers\include;..\3rdparty\wolfssl\wolfssl;..\3rdparty\curl\curl\include;..\3rdparty\libusb\libusb\libusb;$(VULKAN_SDK)\Include;..\3rdparty\XAudio2Redist\include;$(QTDIR)\include;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtCore;.\release;$(QTDIR)\mkspecs\win32-msvc2015;.\QTGeneratedFiles\$(ConfigurationName);.\QTGeneratedFiles;$(QTDIR)\include\QtWinExtras;$(QTDIR)\include\QtConcurrent;$(QTDIR)\include\QtMultimedia;$(QTDIR)\include\QtMultimediaWidgets;$(QTDIR)\include\QtSvg;%(AdditionalIncludeDirectories) -Zc:strictStrings -Zc:throwingNew- -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions) release\ false @@ -79,7 +79,7 @@ 4577;4467;%(DisableSpecificWarnings) $(IntDir) MaxSpeed - _WINDOWS;UNICODE;WIN32;WIN64;WITH_DISCORD_RPC;QT_NO_DEBUG;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;NDEBUG;QT_WINEXTRAS_LIB;QT_CONCURRENT_LIB;QT_MULTIMEDIA_LIB;QT_MULTIMEDIAWIDGETS_LIB;%(PreprocessorDefinitions) + _WINDOWS;UNICODE;WIN32;WIN64;WITH_DISCORD_RPC;QT_NO_DEBUG;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;NDEBUG;QT_WINEXTRAS_LIB;QT_CONCURRENT_LIB;QT_MULTIMEDIA_LIB;QT_MULTIMEDIAWIDGETS_LIB;QT_SVG_LIB;%(PreprocessorDefinitions) false $(IntDir)vc$(PlatformToolsetVersion).pdb true @@ -88,7 +88,7 @@ Level3 - Ole32.lib;gdi32.lib;..\hidapi.lib;..\libusb-1.0.lib;winmm.lib;OpenAL.lib;XAudio.lib;GLGSRender.lib;shlwapi.lib;VKGSRender.lib;vulkan-1.lib;wolfssl.lib;libcurl.lib;Wldap32.lib;glslang.lib;OSDependent.lib;OGLCompiler.lib;SPIRV.lib;MachineIndependent.lib;GenericCodeGen.lib;Advapi32.lib;user32.lib;zlib.lib;..\libpng16.lib;asmjit.lib;yaml-cpp.lib;discord-rpc.lib;emucore.lib;dxgi.lib;$(QTDIR)\lib\qtmain.lib;shell32.lib;$(QTDIR)\lib\Qt5Widgets.lib;$(QTDIR)\lib\Qt5Gui.lib;$(QTDIR)\lib\Qt5Core.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;Qt5WinExtras.lib;Qt5Concurrent.lib;7zlib.lib;SPIRV-Tools.lib;SPIRV-Tools-opt.lib;Qt5Multimedia.lib;Qt5MultimediaWidgets.lib;%(AdditionalDependencies) + Ole32.lib;gdi32.lib;..\hidapi.lib;..\libusb-1.0.lib;winmm.lib;OpenAL.lib;XAudio.lib;GLGSRender.lib;shlwapi.lib;VKGSRender.lib;vulkan-1.lib;wolfssl.lib;libcurl.lib;Wldap32.lib;glslang.lib;OSDependent.lib;OGLCompiler.lib;SPIRV.lib;MachineIndependent.lib;GenericCodeGen.lib;Advapi32.lib;user32.lib;zlib.lib;..\libpng16.lib;asmjit.lib;yaml-cpp.lib;discord-rpc.lib;emucore.lib;dxgi.lib;$(QTDIR)\lib\qtmain.lib;shell32.lib;$(QTDIR)\lib\Qt5Widgets.lib;$(QTDIR)\lib\Qt5Gui.lib;$(QTDIR)\lib\Qt5Core.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;Qt5WinExtras.lib;Qt5Concurrent.lib;7zlib.lib;SPIRV-Tools.lib;SPIRV-Tools-opt.lib;Qt5Multimedia.lib;Qt5MultimediaWidgets.lib;Qt5Svg.lib;%(AdditionalDependencies) ..\3rdparty\OpenAL\libs\Win64;..\3rdparty\glslang\build\hlsl\Release;..\3rdparty\glslang\build\SPIRV\Release;..\3rdparty\glslang\build\OGLCompilersDLL\Release;..\3rdparty\glslang\build\glslang\OSDependent\Windows\Release;..\3rdparty\glslang\build\glslang\Release;..\3rdparty\SPIRV\build\source\Release;..\3rdparty\SPIRV\build\source\opt\Release;..\lib\$(CONFIGURATION)-$(PLATFORM);..\3rdparty\XAudio2Redist\libs;..\3rdparty\discord-rpc\lib;$(QTDIR)\lib;%(AdditionalLibraryDirectories);$(VULKAN_SDK)\Lib "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) true @@ -122,7 +122,7 @@ - ..\3rdparty\flatbuffers\include;..\3rdparty\wolfssl\wolfssl;..\3rdparty\curl\curl\include;..\3rdparty\libusb\libusb\libusb;$(VULKAN_SDK)\Include;..\3rdparty\XAudio2Redist\include;$(QTDIR)\include;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtCore;.\debug;$(QTDIR)\mkspecs\win32-msvc2015;.\QTGeneratedFiles\$(ConfigurationName);.\QTGeneratedFiles;$(QTDIR)\include\QtWinExtras;$(QTDIR)\include\QtConcurrent;$(QTDIR)\include\QtMultimedia;$(QTDIR)\include\QtMultimediaWidgets;%(AdditionalIncludeDirectories) + ..\3rdparty\flatbuffers\include;..\3rdparty\wolfssl\wolfssl;..\3rdparty\curl\curl\include;..\3rdparty\libusb\libusb\libusb;$(VULKAN_SDK)\Include;..\3rdparty\XAudio2Redist\include;$(QTDIR)\include;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtCore;.\debug;$(QTDIR)\mkspecs\win32-msvc2015;.\QTGeneratedFiles\$(ConfigurationName);.\QTGeneratedFiles;$(QTDIR)\include\QtWinExtras;$(QTDIR)\include\QtConcurrent;$(QTDIR)\include\QtMultimedia;$(QTDIR)\include\QtMultimediaWidgets;$(QTDIR)\include\QtSvg;%(AdditionalIncludeDirectories) -Zc:strictStrings -Zc:throwingNew- -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions) debug\ false @@ -130,7 +130,7 @@ 4577;4467;%(DisableSpecificWarnings) $(IntDir) Disabled - _WINDOWS;UNICODE;WIN32;WIN64;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;QT_WINEXTRAS_LIB;QT_CONCURRENT_LIB;QT_MULTIMEDIA_LIB;QT_MULTIMEDIAWIDGETS_LIB;%(PreprocessorDefinitions) + _WINDOWS;UNICODE;WIN32;WIN64;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;QT_WINEXTRAS_LIB;QT_CONCURRENT_LIB;QT_MULTIMEDIA_LIB;QT_MULTIMEDIAWIDGETS_LIB;QT_SVG_LIB;%(PreprocessorDefinitions) false true true @@ -139,7 +139,7 @@ $(IntDir)vc$(PlatformToolsetVersion).pdb - Ole32.lib;gdi32.lib;..\hidapi.lib;..\libusb-1.0.lib;winmm.lib;OpenAL.lib;XAudio.lib;GLGSRender.lib;shlwapi.lib;VKGSRender.lib;vulkan-1.lib;wolfssl.lib;libcurl.lib;Wldap32.lib;glslangd.lib;OSDependentd.lib;OGLCompilerd.lib;SPIRVd.lib;MachineIndependentd.lib;GenericCodeGend.lib;Advapi32.lib;user32.lib;zlib.lib;..\libpng16.lib;asmjit.lib;yaml-cpp.lib;discord-rpc.lib;emucore.lib;dxgi.lib;$(QTDIR)\lib\qtmaind.lib;shell32.lib;$(QTDIR)\lib\Qt5Widgetsd.lib;$(QTDIR)\lib\Qt5Guid.lib;$(QTDIR)\lib\Qt5Cored.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5Widgetsd.lib;Qt5WinExtrasd.lib;Qt5Concurrentd.lib;7zlib.lib;SPIRV-Tools.lib;SPIRV-Tools-opt.lib;Qt5Multimediad.lib;Qt5MultimediaWidgetsd.lib;%(AdditionalDependencies) + Ole32.lib;gdi32.lib;..\hidapi.lib;..\libusb-1.0.lib;winmm.lib;OpenAL.lib;XAudio.lib;GLGSRender.lib;shlwapi.lib;VKGSRender.lib;vulkan-1.lib;wolfssl.lib;libcurl.lib;Wldap32.lib;glslangd.lib;OSDependentd.lib;OGLCompilerd.lib;SPIRVd.lib;MachineIndependentd.lib;GenericCodeGend.lib;Advapi32.lib;user32.lib;zlib.lib;..\libpng16.lib;asmjit.lib;yaml-cpp.lib;discord-rpc.lib;emucore.lib;dxgi.lib;$(QTDIR)\lib\qtmaind.lib;shell32.lib;$(QTDIR)\lib\Qt5Widgetsd.lib;$(QTDIR)\lib\Qt5Guid.lib;$(QTDIR)\lib\Qt5Cored.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5Widgetsd.lib;Qt5WinExtrasd.lib;Qt5Concurrentd.lib;7zlib.lib;SPIRV-Tools.lib;SPIRV-Tools-opt.lib;Qt5Multimediad.lib;Qt5MultimediaWidgetsd.lib;Qt5Svgd.lib;%(AdditionalDependencies) ..\3rdparty\OpenAL\libs\Win64;..\3rdparty\glslang\build\hlsl\Debug;..\3rdparty\glslang\build\SPIRV\Debug;..\3rdparty\glslang\build\OGLCompilersDLL\Debug;..\3rdparty\glslang\build\glslang\OSDependent\Windows\Debug;..\3rdparty\glslang\build\glslang\Debug;..\3rdparty\SPIRV\build\source\opt\Debug;..\3rdparty\XAudio2Redist\libs;..\3rdparty\discord-rpc\lib;..\lib\$(CONFIGURATION)-$(PLATFORM);$(QTDIR)\lib;%(AdditionalLibraryDirectories);$(VULKAN_SDK)\Lib "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /VERBOSE %(AdditionalOptions) true diff --git a/rpcs3/rpcs3qt/about_dialog.cpp b/rpcs3/rpcs3qt/about_dialog.cpp index 002baf7c60..cf1f4348c1 100644 --- a/rpcs3/rpcs3qt/about_dialog.cpp +++ b/rpcs3/rpcs3qt/about_dialog.cpp @@ -5,16 +5,15 @@ #include #include - -constexpr auto qstr = QString::fromStdString; +#include about_dialog::about_dialog(QWidget* parent) : QDialog(parent), ui(new Ui::about_dialog) { ui->setupUi(this); ui->close->setDefault(true); - - ui->version->setText(tr("RPCS3 Version: %1").arg(qstr(rpcs3::get_version().to_string()))); + ui->icon->load(QStringLiteral(":/rpcs3.svg")); + ui->version->setText(tr("RPCS3 Version: %1").arg(QString::fromStdString(rpcs3::get_version().to_string()))); // Events connect(ui->gitHub, &QPushButton::clicked, [] { QDesktopServices::openUrl(QUrl("https://www.github.com/RPCS3")); }); diff --git a/rpcs3/rpcs3qt/about_dialog.ui b/rpcs3/rpcs3qt/about_dialog.ui index 7d67eece31..a33426ff02 100644 --- a/rpcs3/rpcs3qt/about_dialog.ui +++ b/rpcs3/rpcs3qt/about_dialog.ui @@ -57,34 +57,14 @@ 0 - - + + 50 50 - - - 8 - - - - - - - :/Icons/insignia.png - - - true - - - Qt::AlignHCenter|Qt::AlignTop - - - 0 - @@ -383,6 +363,14 @@ + + + QSvgWidget + QWidget +
qsvgwidget.h
+ 1 +
+
diff --git a/rpcs3/rpcs3qt/gui_application.cpp b/rpcs3/rpcs3qt/gui_application.cpp index 8d6c295123..0b0bb54ef9 100644 --- a/rpcs3/rpcs3qt/gui_application.cpp +++ b/rpcs3/rpcs3qt/gui_application.cpp @@ -105,7 +105,7 @@ bool gui_application::Init() if (m_gui_settings->GetValue(gui::ib_show_welcome).toBool()) { - welcome_dialog* welcome = new welcome_dialog(); + welcome_dialog* welcome = new welcome_dialog(m_gui_settings); welcome->exec(); } diff --git a/rpcs3/rpcs3qt/pad_settings_dialog.cpp b/rpcs3/rpcs3qt/pad_settings_dialog.cpp index acaa191f02..4d9cd8eb87 100644 --- a/rpcs3/rpcs3qt/pad_settings_dialog.cpp +++ b/rpcs3/rpcs3qt/pad_settings_dialog.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include "qt_utils.h" #include "pad_settings_dialog.h" @@ -20,16 +21,6 @@ #include "Input/pad_thread.h" #include "Input/product_info.h" #include "Input/keyboard_pad_handler.h" -#include "Input/ds3_pad_handler.h" -#include "Input/ds4_pad_handler.h" -#include "Input/dualsense_pad_handler.h" -#ifdef _WIN32 -#include "Input/xinput_pad_handler.h" -#include "Input/mm_joystick_handler.h" -#endif -#ifdef HAVE_LIBEVDEV -#include "Input/evdev_joystick_handler.h" -#endif LOG_CHANNEL(cfg_log, "CFG"); @@ -193,7 +184,13 @@ pad_settings_dialog::pad_settings_dialog(std::shared_ptr gui_setti SubscribeTooltips(); // Repaint controller image - ui->l_controller->setPixmap(gui::utils::get_colorized_pixmap(ui->l_controller->pixmap(Qt::ReturnByValue), QColor(), gui::utils::get_label_color("l_controller"), false, true)); + QSvgRenderer renderer(QStringLiteral(":/Icons/DualShock_3.svg")); + QPixmap controller_pixmap(renderer.defaultSize() * 10); + controller_pixmap.fill(Qt::transparent); + QPainter painter(&controller_pixmap); + painter.setRenderHints(QPainter::TextAntialiasing | QPainter::Antialiasing | QPainter::SmoothPixmapTransform); + renderer.render(&painter, controller_pixmap.rect()); + ui->l_controller->setPixmap(gui::utils::get_colorized_pixmap(controller_pixmap, QColor(), gui::utils::get_label_color("l_controller"), false, true)); // Show default widgets first in order to calculate the required size for the scroll area (see pad_settings_dialog::ResizeDialog) ui->left_stack->setCurrentIndex(0); diff --git a/rpcs3/rpcs3qt/pad_settings_dialog.ui b/rpcs3/rpcs3qt/pad_settings_dialog.ui index c54fa1b5bb..75bc591e78 100644 --- a/rpcs3/rpcs3qt/pad_settings_dialog.ui +++ b/rpcs3/rpcs3qt/pad_settings_dialog.ui @@ -1414,14 +1414,8 @@ 256 - - - - - Qt::AutoText - - :/Icons/controller.png + :/Icons/DualShock_3.svg true diff --git a/rpcs3/rpcs3qt/welcome_dialog.cpp b/rpcs3/rpcs3qt/welcome_dialog.cpp index 02bc5f8bd8..172bc48089 100644 --- a/rpcs3/rpcs3qt/welcome_dialog.cpp +++ b/rpcs3/rpcs3qt/welcome_dialog.cpp @@ -5,25 +5,28 @@ #include #include +#include -welcome_dialog::welcome_dialog(QWidget* parent) : QDialog(parent), ui(new Ui::welcome_dialog) +welcome_dialog::welcome_dialog(std::shared_ptr gui_settings, QWidget* parent) + : QDialog(parent) + , ui(new Ui::welcome_dialog) + , m_gui_settings(std::move(gui_settings)) { ui->setupUi(this); setWindowFlags(windowFlags() & Qt::WindowTitleHint); - gui_settings* settings = new gui_settings(this); - ui->okay->setEnabled(false); + ui->icon_label->load(QStringLiteral(":/rpcs3.svg")); - connect(ui->i_have_read, &QCheckBox::clicked, [=, this](bool checked) + connect(ui->i_have_read, &QCheckBox::clicked, [this](bool checked) { ui->okay->setEnabled(checked); }); - connect(ui->do_not_show, &QCheckBox::clicked, [=, this](bool checked) + connect(ui->do_not_show, &QCheckBox::clicked, [this](bool checked) { - settings->SetValue(gui::ib_show_welcome, QVariant(!checked)); + m_gui_settings->SetValue(gui::ib_show_welcome, QVariant(!checked)); }); connect(ui->okay, &QPushButton::clicked, this, &QDialog::accept); diff --git a/rpcs3/rpcs3qt/welcome_dialog.h b/rpcs3/rpcs3qt/welcome_dialog.h index 1521347ece..b88b4d5406 100644 --- a/rpcs3/rpcs3qt/welcome_dialog.h +++ b/rpcs3/rpcs3qt/welcome_dialog.h @@ -7,14 +7,17 @@ namespace Ui class welcome_dialog; } +class gui_settings; + class welcome_dialog : public QDialog { Q_OBJECT public: - explicit welcome_dialog(QWidget* parent = nullptr); + explicit welcome_dialog(std::shared_ptr gui_settings, QWidget* parent = nullptr); ~welcome_dialog(); private: Ui::welcome_dialog *ui; + std::shared_ptr m_gui_settings; }; diff --git a/rpcs3/rpcs3qt/welcome_dialog.ui b/rpcs3/rpcs3qt/welcome_dialog.ui index e22cc0fa91..d1b6585e2a 100644 --- a/rpcs3/rpcs3qt/welcome_dialog.ui +++ b/rpcs3/rpcs3qt/welcome_dialog.ui @@ -57,33 +57,13 @@ 0 - + 50 50 - - - 8 - - - - - - - :/Icons/insignia.png - - - true - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - 0 - @@ -280,6 +260,14 @@ + + + QSvgWidget + QWidget +
qsvgwidget.h
+ 1 +
+