Compare commits

...

2 commits

Author SHA1 Message Date
BearOso
8f41776532 Qt: Hide software filter box.
May remove this in the future because it's unneeded with shaders.
2024-05-13 14:26:02 -05:00
BearOso
c9b90655bd Qt/Windows: Match system color scheme.
Use windowsvista style for light, dark fusion scheme for dark.
2024-05-13 13:58:31 -05:00
3 changed files with 37 additions and 27 deletions

View file

@ -98,6 +98,8 @@ DisplayPanel::DisplayPanel(EmuApplication *app_)
if (recreate) if (recreate)
app->window->recreateUIAssets(); app->window->recreateUIAssets();
}); });
groupBox_software_filters->hide();
} }
DisplayPanel::~DisplayPanel() DisplayPanel::~DisplayPanel()

View file

@ -311,7 +311,7 @@ Output directly will cause the screen to change between the two modes and look w
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="groupBox_3"> <widget class="QGroupBox" name="groupBox_software_filters">
<property name="title"> <property name="title">
<string>Software Filters</string> <string>Software Filters</string>
</property> </property>

View file

@ -6,6 +6,7 @@
#include <clocale> #include <clocale>
#include <qnamespace.h> #include <qnamespace.h>
#include <QStyle> #include <QStyle>
#include <QStyleHints>
#ifndef _WIN32 #ifndef _WIN32
#include <csignal> #include <csignal>
@ -27,6 +28,8 @@ int main(int argc, char *argv[])
QGuiApplication::setDesktopFileName("snes9x-gtk"); QGuiApplication::setDesktopFileName("snes9x-gtk");
if (emu.qtapp->platformName() == "windows") if (emu.qtapp->platformName() == "windows")
{
if (emu.qtapp->styleHints()->colorScheme() == Qt::ColorScheme::Dark)
{ {
emu.qtapp->setStyle("fusion"); emu.qtapp->setStyle("fusion");
@ -58,6 +61,11 @@ int main(int argc, char *argv[])
darkPalette.setColor(QPalette::Disabled, QPalette::Light, darkGray); darkPalette.setColor(QPalette::Disabled, QPalette::Light, darkGray);
emu.qtapp->setPalette(darkPalette); emu.qtapp->setPalette(darkPalette);
} }
else
{
emu.qtapp->setStyle("windowsvista");
}
}
#ifndef _WIN32 #ifndef _WIN32
auto quit_handler = [](int) { QApplication::quit(); }; auto quit_handler = [](int) { QApplication::quit(); };