Help - improvement (#1522)

* Help - improvement

* Adding shadow below icons

* Adding keys icon + Update changelog

* color according to the selected theme

* submenu 'Keys and Shortcuts'

* clang

* +

* remove keys_shortcuts

---------

Co-authored-by: ¥IGA <164882787+Xphalnos@users.noreply.github.com>
This commit is contained in:
DanielSvoboda 2024-12-09 13:47:26 -03:00 committed by GitHub
parent 0b59ebb22f
commit 07f451650f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 443 additions and 68 deletions

View file

@ -1014,4 +1014,4 @@ if (ENABLE_QT_GUI AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
install(FILES "dist/net.shadps4.shadPS4.metainfo.xml" DESTINATION "share/metainfo")
install(FILES ".github/shadps4.png" DESTINATION "share/icons/hicolor/512x512/apps" RENAME "net.shadps4.shadPS4.png")
install(FILES "src/images/net.shadps4.shadPS4.svg" DESTINATION "share/icons/hicolor/scalable/apps")
endif()
endif()

View file

@ -12,12 +12,13 @@ path = [
"dist/net.shadps4.shadPS4_metadata.pot",
"dist/net.shadps4.shadPS4.metainfo.xml",
"dist/net.shadps4.shadPS4.releases.xml",
"documents/changelog.txt",
"documents/changelog.md",
"documents/Quickstart/2.png",
"documents/Screenshots/*",
"scripts/ps4_names.txt",
"src/images/about_icon.png",
"src/images/controller_icon.png",
"src/images/discord.png",
"src/images/dump_icon.png",
"src/images/exit_icon.png",
"src/images/file_icon.png",
@ -28,8 +29,10 @@ path = [
"src/images/flag_us.png",
"src/images/flag_world.png",
"src/images/folder_icon.png",
"src/images/github.png",
"src/images/grid_icon.png",
"src/images/iconsize_icon.png",
"src/images/ko-fi.png",
"src/images/list_icon.png",
"src/images/list_mode_icon.png",
"src/images/pause_icon.png",
@ -43,6 +46,8 @@ path = [
"src/images/net.shadps4.shadPS4.svg",
"src/images/themes_icon.png",
"src/images/update_icon.png",
"src/images/youtube.png",
"src/images/website.png",
"src/shadps4.qrc",
"src/shadps4.rc",
]

99
documents/changelog.md Normal file
View file

@ -0,0 +1,99 @@
v0.4.0 31/10/2024 - codename divicius
=================
- Shader recompiler fixes
- Emulated support for cpus that doesn't have SSE4.2a (intel cpus)
- Frame graph + Precise 60 fps timing
- Save data: fix nullptr & concurrent file write
- Auto Update
- Error dialog implementation
- Swapchain recreation and window resizing
- Add playback of background/title music in game list
- Kernel: Quiet sceKernelWaitEventFlag error log on timeout
- Improve keyboard navigation in game list
- core/memory: Pooled memory implementation
- Fix PKG loading
- replace trophy xml assert with error
- Refactor audio handling with range checks, buffer threshold, and lock
- audio_core: Fix return value types and shift some error handling to library
- Devtools: PM4 Explorer
- Initial support of Geometry shaders
- Working touchpad support
- net: Stub sceNetErrnoLoc
- Add support to click touchpad using back button on non PS4/5 controllers
- Multiple Install Folders
- Using a more standard data directory for linux
- video_core: Implement sceGnmInsertPushColorMarker
- ime_dialog: Initial implementation
- Network libs fixes
- Use GetSystemTimePreciseAsFileTime to fix fps timing issues
- Added adaptive mutex initializer
- Small Np + trophy fixes
- Separate Updates from Game Folder
- Minor Fixes for Separate Update Folder
- AvPlayer: Do not align w/h to 16 with vdec2
- Improve sceSystemServiceReceiveEvent stub
- renderer_vulkan: Commize and adjust buffer bindings
- Add poll interval to libScePad
- Add more surface format mappings.
- vulkan: Report only missing format feature flags.
- IME implementation
- Videodec2 implementation
- path_util: Make sure macOS has current directory set and clean up path code.
- Load LLE modules from sys_modules/GAMEID folder
v0.3.0 23/09/2024 - codename broamic
=================
- Cheat/Patching support
- DLC support
- New translations support (26 languages)
- Support for unlocking trophies
- Support for more controllers (Dualshock and Xbox)
- Many GUI improvements
- AVplayer
v0.2.0 15/08/2024 - codename validptr
=================
- Adding macOS support
- Big shader recompiler improvements
- Core improvements
- GUI improvements
v0.1.0 01/07/2024 - codename madturtle
=================
- Added a shader recompiler, with this we have a lot of games that starts to work
- Rewrote a big part of core
v0.0.3 23/03/2024 - codename salad
=================
- Switching to std::thread
- Use unique_ptr where possible
- Replace printf/scanf with type safe fmt
- Implemented sceKernelGetProcessTime
- Implemented sceKernelGetProcessTimeCounter, sceKernelGetProcessTimeCounterFrequency
- Pause emu with P button
- Timers rewrote with std::chrono
- Added sceSystemServiceGetStatus
- Initial FileSystem implementation
- Initial TLS work
- New logging implementation
- Some functions implemented for userService, systemService
- Added sceAudioOut module and output using SDL audio
v0.0.2 21/10/2023
=================
- Using cstdint header in variable types
- run_main_entry: Rewrite in asm for stack setup
- Printf libc implementation for work with sysv_abi
- Initial pad emulation (only digital pad atm)
- Implemented sceVideoOutIsFlipPending
- Added auto stubs, now unsupported hle function will resolve as empty stubs
- Rewrote libc_cxa functions
- Libc implementations ( _ZdlPv,_Znwm,rand,_Fsin,qsort,free,strncpy,memmove,atan2f,pow,_Sin)
- ET_SCE_DYNAMIC behaves as valid for execution now
- Initial FileSystem work (not yet usable)
v0.0.1 29/09/2023
=================
First public release. Everything is new.

View file

@ -1,55 +0,0 @@
v0.3.0 23/09/2024 - codename broamic
=================
- Cheat/Patching support
- DLC support
- New translations support (26 languages)
- Support for unlocking trophies
- Support for more controllers (Dualshock and Xbox)
- Many GUI improvements
- AVplayer
v0.2.0 15/08/2024 - codename validptr
=================
- Adding macOS support
- Big shader recompiler improvements
- Core improvements
- GUI improvements
v0.1.0 01/07/2024 - codename madturtle
=================
- Added a shader recompiler, with this we have a lot of games that starts to work
- Rewrote a big part of core
v0.0.3 23/03/2024 - codename salad
=================
- Switching to std::thread
- Use unique_ptr where possible
- Replace printf/scanf with type safe fmt
- Implemented sceKernelGetProcessTime
- Implemented sceKernelGetProcessTimeCounter, sceKernelGetProcessTimeCounterFrequency
- Pause emu with P button
- Timers rewrote with std::chrono
- Added sceSystemServiceGetStatus
- Initial FileSystem implementation
- Initial TLS work
- New logging implementation
- Some functions implemented for userService, systemService
- Added sceAudioOut module and output using SDL audio
v0.0.2 21/10/2023
=================
- Using cstdint header in variable types
- run_main_entry: Rewrite in asm for stack setup
- Printf libc implementation for work with sysv_abi
- Initial pad emulation (only digital pad atm)
- Implemented sceVideoOutIsFlipPending
- Added auto stubs, now unsupported hle function will resolve as empty stubs
- Rewrote libc_cxa functions
- Libc implementations ( _ZdlPv,_Znwm,rand,_Fsin,qsort,free,strncpy,memmove,atan2f,pow,_Sin)
- ET_SCE_DYNAMIC behaves as valid for execution now
- Initial FileSystem work (not yet usable)
v0.0.1 29/09/2023
=================
First public release. Everything is new.

BIN
src/images/discord.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

BIN
src/images/github.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

BIN
src/images/ko-fi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

BIN
src/images/website.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

BIN
src/images/youtube.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View file

@ -1,13 +1,194 @@
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <QDesktopServices>
#include <QEvent>
#include <QGraphicsDropShadowEffect>
#include <QImage>
#include <QLabel>
#include <QPixmap>
#include <common/config.h>
#include "about_dialog.h"
#include "main_window_themes.h"
#include "ui_about_dialog.h"
AboutDialog::AboutDialog(QWidget* parent) : QDialog(parent), ui(new Ui::AboutDialog) {
ui->setupUi(this);
preloadImages();
ui->image_1->setAttribute(Qt::WA_Hover, true);
ui->image_2->setAttribute(Qt::WA_Hover, true);
ui->image_3->setAttribute(Qt::WA_Hover, true);
ui->image_4->setAttribute(Qt::WA_Hover, true);
ui->image_5->setAttribute(Qt::WA_Hover, true);
ui->image_1->installEventFilter(this);
ui->image_2->installEventFilter(this);
ui->image_3->installEventFilter(this);
ui->image_4->installEventFilter(this);
ui->image_5->installEventFilter(this);
}
AboutDialog::~AboutDialog() {
delete ui;
}
void AboutDialog::preloadImages() {
originalImages[0] = ui->image_1->pixmap().copy();
originalImages[1] = ui->image_2->pixmap().copy();
originalImages[2] = ui->image_3->pixmap().copy();
originalImages[3] = ui->image_4->pixmap().copy();
originalImages[4] = ui->image_5->pixmap().copy();
for (int i = 0; i < 5; ++i) {
QImage image = originalImages[i].toImage();
for (int y = 0; y < image.height(); ++y) {
for (int x = 0; x < image.width(); ++x) {
QColor color = image.pixelColor(x, y);
color.setRed(255 - color.red());
color.setGreen(255 - color.green());
color.setBlue(255 - color.blue());
image.setPixelColor(x, y, color);
}
}
invertedImages[i] = QPixmap::fromImage(image);
}
updateImagesForCurrentTheme();
}
void AboutDialog::updateImagesForCurrentTheme() {
Theme currentTheme = static_cast<Theme>(Config::getMainWindowTheme());
bool isDarkTheme = (currentTheme == Theme::Dark || currentTheme == Theme::Green ||
currentTheme == Theme::Blue || currentTheme == Theme::Violet);
if (isDarkTheme) {
ui->image_1->setPixmap(invertedImages[0]);
ui->image_2->setPixmap(invertedImages[1]);
ui->image_3->setPixmap(invertedImages[2]);
ui->image_4->setPixmap(invertedImages[3]);
ui->image_5->setPixmap(invertedImages[4]);
} else {
ui->image_1->setPixmap(originalImages[0]);
ui->image_2->setPixmap(originalImages[1]);
ui->image_3->setPixmap(originalImages[2]);
ui->image_4->setPixmap(originalImages[3]);
ui->image_5->setPixmap(originalImages[4]);
}
}
bool AboutDialog::eventFilter(QObject* obj, QEvent* event) {
if (event->type() == QEvent::Enter) {
if (obj == ui->image_1) {
if (isDarkTheme()) {
ui->image_1->setPixmap(originalImages[0]);
} else {
ui->image_1->setPixmap(invertedImages[0]);
}
applyHoverEffect(ui->image_1);
} else if (obj == ui->image_2) {
if (isDarkTheme()) {
ui->image_2->setPixmap(originalImages[1]);
} else {
ui->image_2->setPixmap(invertedImages[1]);
}
applyHoverEffect(ui->image_2);
} else if (obj == ui->image_3) {
if (isDarkTheme()) {
ui->image_3->setPixmap(originalImages[2]);
} else {
ui->image_3->setPixmap(invertedImages[2]);
}
applyHoverEffect(ui->image_3);
} else if (obj == ui->image_4) {
if (isDarkTheme()) {
ui->image_4->setPixmap(originalImages[3]);
} else {
ui->image_4->setPixmap(invertedImages[3]);
}
applyHoverEffect(ui->image_4);
} else if (obj == ui->image_5) {
if (isDarkTheme()) {
ui->image_5->setPixmap(originalImages[4]);
} else {
ui->image_5->setPixmap(invertedImages[4]);
}
applyHoverEffect(ui->image_5);
}
} else if (event->type() == QEvent::Leave) {
if (obj == ui->image_1) {
if (isDarkTheme()) {
ui->image_1->setPixmap(invertedImages[0]);
} else {
ui->image_1->setPixmap(originalImages[0]);
}
removeHoverEffect(ui->image_1);
} else if (obj == ui->image_2) {
if (isDarkTheme()) {
ui->image_2->setPixmap(invertedImages[1]);
} else {
ui->image_2->setPixmap(originalImages[1]);
}
removeHoverEffect(ui->image_2);
} else if (obj == ui->image_3) {
if (isDarkTheme()) {
ui->image_3->setPixmap(invertedImages[2]);
} else {
ui->image_3->setPixmap(originalImages[2]);
}
removeHoverEffect(ui->image_3);
} else if (obj == ui->image_4) {
if (isDarkTheme()) {
ui->image_4->setPixmap(invertedImages[3]);
} else {
ui->image_4->setPixmap(originalImages[3]);
}
removeHoverEffect(ui->image_4);
} else if (obj == ui->image_5) {
if (isDarkTheme()) {
ui->image_5->setPixmap(invertedImages[4]);
} else {
ui->image_5->setPixmap(originalImages[4]);
}
removeHoverEffect(ui->image_5);
}
} else if (event->type() == QEvent::MouseButtonPress) {
if (obj == ui->image_1) {
QDesktopServices::openUrl(QUrl("https://github.com/shadps4-emu/shadPS4"));
} else if (obj == ui->image_2) {
QDesktopServices::openUrl(QUrl("https://discord.gg/bFJxfftGW6"));
} else if (obj == ui->image_3) {
QDesktopServices::openUrl(QUrl("https://www.youtube.com/@shadPS4/videos"));
} else if (obj == ui->image_4) {
QDesktopServices::openUrl(QUrl("https://ko-fi.com/shadps4"));
} else if (obj == ui->image_5) {
QDesktopServices::openUrl(QUrl("https://shadps4.net"));
}
return true;
}
return QDialog::eventFilter(obj, event);
}
void AboutDialog::applyHoverEffect(QLabel* label) {
QColor shadowColor = isDarkTheme() ? QColor(0, 0, 0) : QColor(169, 169, 169);
QGraphicsDropShadowEffect* shadow = new QGraphicsDropShadowEffect;
shadow->setBlurRadius(5);
shadow->setXOffset(2);
shadow->setYOffset(2);
shadow->setColor(shadowColor);
label->setGraphicsEffect(shadow);
}
void AboutDialog::removeHoverEffect(QLabel* label) {
QColor shadowColor = isDarkTheme() ? QColor(50, 50, 50) : QColor(169, 169, 169);
QGraphicsDropShadowEffect* shadow = new QGraphicsDropShadowEffect;
shadow->setBlurRadius(3);
shadow->setXOffset(0);
shadow->setYOffset(0);
shadow->setColor(shadowColor);
label->setGraphicsEffect(shadow);
}
bool AboutDialog::isDarkTheme() const {
Theme currentTheme = static_cast<Theme>(Config::getMainWindowTheme());
return currentTheme == Theme::Dark || currentTheme == Theme::Green ||
currentTheme == Theme::Blue || currentTheme == Theme::Violet;
}

View file

@ -3,7 +3,11 @@
#pragma once
#include <QDesktopServices>
#include <QDialog>
#include <QLabel>
#include <QPixmap>
#include <QUrl>
namespace Ui {
class AboutDialog;
@ -15,7 +19,18 @@ class AboutDialog : public QDialog {
public:
explicit AboutDialog(QWidget* parent = nullptr);
~AboutDialog();
bool eventFilter(QObject* obj, QEvent* event);
private:
Ui::AboutDialog* ui;
};
void preloadImages();
void updateImagesForCurrentTheme();
void applyHoverEffect(QLabel* label);
void removeHoverEffect(QLabel* label);
bool isDarkTheme() const;
QPixmap originalImages[5];
QPixmap invertedImages[5];
};

View file

@ -9,7 +9,7 @@
<x>0</x>
<y>0</y>
<width>780</width>
<height>320</height>
<height>310</height>
</rect>
</property>
<property name="windowTitle">
@ -22,14 +22,14 @@
<widget class="QLabel" name="shad_logo">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<x>15</x>
<y>15</y>
<width>271</width>
<height>261</height>
<height>271</height>
</rect>
</property>
<property name="frameShape">
<enum>QFrame::Shape::NoFrame</enum>
<enum>QFrame::NoFrame</enum>
</property>
<property name="text">
<string/>
@ -45,7 +45,7 @@
<property name="geometry">
<rect>
<x>310</x>
<y>40</y>
<y>15</y>
<width>171</width>
<height>41</height>
</rect>
@ -64,9 +64,9 @@
<property name="geometry">
<rect>
<x>310</x>
<y>90</y>
<y>60</y>
<width>451</width>
<height>101</height>
<height>70</height>
</rect>
</property>
<property name="font">
@ -85,9 +85,9 @@
<property name="geometry">
<rect>
<x>310</x>
<y>180</y>
<y>130</y>
<width>451</width>
<height>101</height>
<height>70</height>
</rect>
</property>
<property name="font">
@ -102,6 +102,131 @@
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" name="image_1">
<property name="geometry">
<rect>
<x>310</x>
<y>210</y>
<width>80</width>
<height>80</height>
</rect>
</property>
<property name="cursor">
<cursorShape>ArrowCursor</cursorShape>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap>:/images/github.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" name="image_2">
<property name="geometry">
<rect>
<x>400</x>
<y>210</y>
<width>80</width>
<height>80</height>
</rect>
</property>
<property name="cursor">
<cursorShape>ArrowCursor</cursorShape>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap>:/images/discord.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" name="image_3">
<property name="geometry">
<rect>
<x>490</x>
<y>210</y>
<width>80</width>
<height>80</height>
</rect>
</property>
<property name="cursor">
<cursorShape>ArrowCursor</cursorShape>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap>:/images/youtube.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" name="image_4">
<property name="geometry">
<rect>
<x>580</x>
<y>210</y>
<width>80</width>
<height>80</height>
</rect>
</property>
<property name="cursor">
<cursorShape>ArrowCursor</cursorShape>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap>:/images/ko-fi.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" name="image_5">
<property name="geometry">
<rect>
<x>670</x>
<y>210</y>
<width>80</width>
<height>80</height>
</rect>
</property>
<property name="cursor">
<cursorShape>ArrowCursor</cursorShape>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap>:/images/website.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</widget>
<resources/>
<connections/>

View file

@ -25,5 +25,10 @@
<file>images/flag_us.png</file>
<file>images/flag_world.png</file>
<file>images/flag_china.png</file>
<file>images/github.png</file>
<file>images/discord.png</file>
<file>images/ko-fi.png</file>
<file>images/youtube.png</file>
<file>images/website.png</file>
</qresource>
</RCC>