mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-20 09:11:40 +00:00
dark mode for win10
This commit is contained in:
parent
bbdf0732ad
commit
6e41e11f0d
4 changed files with 12 additions and 10 deletions
|
@ -45,6 +45,7 @@
|
|||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch_qt.h</PrecompiledHeaderFile>
|
||||
<ForcedIncludeFiles>pch_qt.h</ForcedIncludeFiles>
|
||||
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>DolphinQt.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
|
|
|
@ -199,7 +199,7 @@ void Settings::ApplyStyle()
|
|||
// which would select Qt's default theme, but unlike other OSes we don't automatically get a
|
||||
// default dark theme on Windows when the user has selected dark mode in the Windows settings.
|
||||
// So manually check if the user wants dark mode and, if yes, load our embedded dark theme.
|
||||
if (style_type == StyleType::Dark || (style_type != StyleType::Light && IsSystemDark()))
|
||||
if (style_type == StyleType::Dark && IsSystemDark())
|
||||
{
|
||||
QFile file(QStringLiteral(":/dolphin_dark_win/dark.qss"));
|
||||
if (file.open(QFile::ReadOnly))
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <QRadioButton>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
#include <QOperatingSystemVersion>
|
||||
|
||||
#include "Common/CommonPaths.h"
|
||||
#include "Common/FileSearch.h"
|
||||
|
@ -130,27 +131,27 @@ void InterfacePane::CreateUI()
|
|||
const QString qt_name = QString::fromStdString(PathToFileName(path));
|
||||
m_combobox_theme->addItem(qt_name);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
// User Style Combobox
|
||||
m_combobox_userstyle = new QComboBox;
|
||||
m_label_userstyle = new QLabel(tr("Style:"));
|
||||
combobox_layout->addRow(m_label_userstyle, m_combobox_userstyle);
|
||||
|
||||
auto userstyle_search_results = Common::DoFileSearch({File::GetUserPath(D_STYLES_IDX)});
|
||||
|
||||
m_combobox_userstyle->addItem(tr("System"), static_cast<int>(Settings::StyleType::System));
|
||||
auto current = QOperatingSystemVersionBase::current();
|
||||
|
||||
// TODO: Support forcing light/dark on other OSes too.
|
||||
#ifdef _WIN32
|
||||
m_combobox_userstyle->addItem(tr("Light"), static_cast<int>(Settings::StyleType::Light));
|
||||
m_combobox_userstyle->addItem(tr("Dark"), static_cast<int>(Settings::StyleType::Dark));
|
||||
#endif
|
||||
if (current <= QOperatingSystemVersion(QOperatingSystemVersion::Windows, 10))
|
||||
{
|
||||
m_combobox_userstyle->addItem(tr("Windows 11"), static_cast<int>(Settings::StyleType::Light));
|
||||
m_combobox_userstyle->addItem(tr("Windows 10"), static_cast<int>(Settings::StyleType::Dark));
|
||||
}
|
||||
|
||||
for (const std::string& path : userstyle_search_results)
|
||||
{
|
||||
const QFileInfo file_info(QString::fromStdString(path));
|
||||
m_combobox_userstyle->addItem(file_info.completeBaseName(), file_info.fileName());
|
||||
}
|
||||
#endif
|
||||
|
||||
// Checkboxes
|
||||
m_checkbox_use_builtin_title_database = new QCheckBox(tr("Use Built-In Database of Game Names"));
|
||||
|
|
|
@ -113,7 +113,7 @@
|
|||
<QtDllNames Include="@(QtDllNames_ -> '%(Identity)$(QtLibSuffix).dll')" />
|
||||
<QtDllsSrc Include="@(QtDllNames -> '$(QtBinDir)%(Identity)')" />
|
||||
<QtDllsDst Include="@(QtDllNames -> '$(BinaryOutputDir)%(Identity)')" />
|
||||
<QtPluginNames_ Include="iconengines\qsvgicon;imageformats\qsvg;platforms\qdirect2d;platforms\qwindows;styles\qwindowsvistastyle"/>
|
||||
<QtPluginNames_ Include="iconengines\qsvgicon;imageformats\qsvg;platforms\qdirect2d;platforms\qwindows;styles\qmodernwindowsstyle"/>
|
||||
<QtPluginNames Include="@(QtPluginNames_ -> '%(Identity)$(QtLibSuffix).dll')" />
|
||||
<QtPluginsSrc Include="@(QtPluginNames -> '$(QtPluginsDir)%(Identity)')" />
|
||||
<QtPluginsDst Include="@(QtPluginNames -> '$(BinaryOutputDir)$(QtPluginFolder)\%(Identity)')" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue