early-access version 2901
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>616</width>
|
||||
<height>261</height>
|
||||
<height>294</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -165,6 +165,7 @@ p, li { white-space: pre-wrap; }
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../../dist/qt_themes_default/default/default.qrc"/>
|
||||
<include location="../../dist/qt_themes/default/default.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
|
||||
@@ -73,7 +73,7 @@ const std::array<int, 2> Config::default_ringcon_analogs{{
|
||||
const std::array<UISettings::Shortcut, 22> Config::default_hotkeys{{
|
||||
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Audio Mute/Unmute")), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")), {QStringLiteral("Ctrl+M"), QStringLiteral("Home+Dpad_Right"), Qt::WindowShortcut}},
|
||||
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Audio Volume Down")), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")), {QStringLiteral("-"), QStringLiteral("Home+Dpad_Down"), Qt::ApplicationShortcut}},
|
||||
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Audio Volume Up")), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")), {QStringLiteral("+"), QStringLiteral("Home+Dpad_Up"), Qt::ApplicationShortcut}},
|
||||
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Audio Volume Up")), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")), {QStringLiteral("="), QStringLiteral("Home+Dpad_Up"), Qt::ApplicationShortcut}},
|
||||
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Capture Screenshot")), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")), {QStringLiteral("Ctrl+P"), QStringLiteral("Screenshot"), Qt::WidgetWithChildrenShortcut}},
|
||||
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Change Adapting Filter")), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")), {QStringLiteral("F8"), QStringLiteral("Home+L"), Qt::ApplicationShortcut}},
|
||||
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Change Docked Mode")), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")), {QStringLiteral("F10"), QStringLiteral("Home+X"), Qt::ApplicationShortcut}},
|
||||
|
||||
@@ -120,10 +120,10 @@
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
<number>200</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>10</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
|
||||
+7
-9
@@ -258,7 +258,7 @@ static QString PrettyProductName() {
|
||||
return QSysInfo::prettyProductName();
|
||||
}
|
||||
|
||||
bool GMainWindow::check_dark_mode() {
|
||||
bool GMainWindow::CheckDarkMode() {
|
||||
#ifdef __linux__
|
||||
const QPalette test_palette(qApp->palette());
|
||||
const QColor text_color = test_palette.color(QPalette::Active, QPalette::Text);
|
||||
@@ -288,7 +288,7 @@ GMainWindow::GMainWindow(bool has_broken_vulkan)
|
||||
statusBar()->hide();
|
||||
|
||||
// Check dark mode before a theme is loaded
|
||||
os_dark_mode = check_dark_mode();
|
||||
os_dark_mode = CheckDarkMode();
|
||||
startup_icon_theme = QIcon::themeName();
|
||||
// fallback can only be set once, colorful theme icons are okay on both light/dark
|
||||
QIcon::setFallbackThemeName(QStringLiteral("colorful"));
|
||||
@@ -1095,7 +1095,7 @@ void GMainWindow::InitializeHotkeys() {
|
||||
connect_shortcut(QStringLiteral("Audio Mute/Unmute"),
|
||||
[] { Settings::values.audio_muted = !Settings::values.audio_muted; });
|
||||
connect_shortcut(QStringLiteral("Audio Volume Down"), [] {
|
||||
const auto current_volume = static_cast<int>(Settings::values.volume.GetValue());
|
||||
const auto current_volume = static_cast<s32>(Settings::values.volume.GetValue());
|
||||
int step = 5;
|
||||
if (current_volume <= 30) {
|
||||
step = 2;
|
||||
@@ -1103,11 +1103,10 @@ void GMainWindow::InitializeHotkeys() {
|
||||
if (current_volume <= 6) {
|
||||
step = 1;
|
||||
}
|
||||
const auto new_volume = std::max(current_volume - step, 0);
|
||||
Settings::values.volume.SetValue(static_cast<u8>(new_volume));
|
||||
Settings::values.volume.SetValue(std::max(current_volume - step, 0));
|
||||
});
|
||||
connect_shortcut(QStringLiteral("Audio Volume Up"), [] {
|
||||
const auto current_volume = static_cast<int>(Settings::values.volume.GetValue());
|
||||
const auto current_volume = static_cast<s32>(Settings::values.volume.GetValue());
|
||||
int step = 5;
|
||||
if (current_volume < 30) {
|
||||
step = 2;
|
||||
@@ -1115,8 +1114,7 @@ void GMainWindow::InitializeHotkeys() {
|
||||
if (current_volume < 6) {
|
||||
step = 1;
|
||||
}
|
||||
const auto new_volume = std::min(current_volume + step, 100);
|
||||
Settings::values.volume.SetValue(static_cast<u8>(new_volume));
|
||||
Settings::values.volume.SetValue(current_volume + step);
|
||||
});
|
||||
connect_shortcut(QStringLiteral("Toggle Framerate Limit"), [] {
|
||||
Settings::values.use_speed_limit.SetValue(!Settings::values.use_speed_limit.GetValue());
|
||||
@@ -3986,7 +3984,7 @@ void GMainWindow::UpdateUITheme() {
|
||||
QIcon::setThemeName(current_theme == QStringLiteral("colorful") ? current_theme
|
||||
: startup_icon_theme);
|
||||
QIcon::setThemeSearchPaths(theme_paths);
|
||||
if (check_dark_mode()) {
|
||||
if (CheckDarkMode()) {
|
||||
current_theme = QStringLiteral("default_dark");
|
||||
}
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -348,6 +348,7 @@ private:
|
||||
void OpenURL(const QUrl& url);
|
||||
void LoadTranslation();
|
||||
void OpenPerGameConfiguration(u64 title_id, const std::string& file_name);
|
||||
bool CheckDarkMode();
|
||||
|
||||
QString GetTasStateDescription() const;
|
||||
|
||||
@@ -395,7 +396,6 @@ private:
|
||||
|
||||
QString startup_icon_theme;
|
||||
bool os_dark_mode = false;
|
||||
bool check_dark_mode();
|
||||
|
||||
// FS
|
||||
std::shared_ptr<FileSys::VfsFilesystem> vfs;
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>24872</string>
|
||||
<string notr="true" extracomment="placeholder string that tells user default port">24872</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user