citra_qt: Use stylesheet with light colored icons if dark mode
BIN
dist/qt_themes/default/icons_light/16x16/checked.png
vendored
Normal file
After Width: | Height: | Size: 657 B |
BIN
dist/qt_themes/default/icons_light/16x16/connected.png
vendored
Normal file
After Width: | Height: | Size: 282 B |
BIN
dist/qt_themes/default/icons_light/16x16/connected_notification.png
vendored
Normal file
After Width: | Height: | Size: 635 B |
BIN
dist/qt_themes/default/icons_light/16x16/disconnected.png
vendored
Normal file
After Width: | Height: | Size: 333 B |
BIN
dist/qt_themes/default/icons_light/16x16/failed.png
vendored
Normal file
After Width: | Height: | Size: 524 B |
BIN
dist/qt_themes/default/icons_light/16x16/lock.png
vendored
Normal file
After Width: | Height: | Size: 318 B |
BIN
dist/qt_themes/default/icons_light/256x256/citra.png
vendored
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
dist/qt_themes/default/icons_light/256x256/plus_folder.png
vendored
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
dist/qt_themes/default/icons_light/48x48/bad_folder.png
vendored
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
dist/qt_themes/default/icons_light/48x48/chip.png
vendored
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
dist/qt_themes/default/icons_light/48x48/folder.png
vendored
Normal file
After Width: | Height: | Size: 529 B |
BIN
dist/qt_themes/default/icons_light/48x48/no_avatar.png
vendored
Normal file
After Width: | Height: | Size: 926 B |
BIN
dist/qt_themes/default/icons_light/48x48/plus.png
vendored
Normal file
After Width: | Height: | Size: 245 B |
BIN
dist/qt_themes/default/icons_light/48x48/sd_card.png
vendored
Normal file
After Width: | Height: | Size: 658 B |
BIN
dist/qt_themes/default/icons_light/48x48/star.png
vendored
Normal file
After Width: | Height: | Size: 1.4 KiB |
13
dist/qt_themes/default/icons_light/index.theme
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[Icon Theme]
|
||||||
|
Name=default
|
||||||
|
Comment=default theme
|
||||||
|
Directories=16x16,48x48,256x256
|
||||||
|
|
||||||
|
[16x16]
|
||||||
|
Size=16
|
||||||
|
|
||||||
|
[48x48]
|
||||||
|
Size=48
|
||||||
|
|
||||||
|
[256x256]
|
||||||
|
Size=256
|
21
dist/qt_themes/default/theme_default.qrc
vendored
@ -17,7 +17,28 @@
|
|||||||
<file alias="48x48/star.png">icons/48x48/star.png</file>
|
<file alias="48x48/star.png">icons/48x48/star.png</file>
|
||||||
<file alias="256x256/plus_folder.png">icons/256x256/plus_folder.png</file>
|
<file alias="256x256/plus_folder.png">icons/256x256/plus_folder.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
|
<qresource prefix="icons/default_with_light_icons">
|
||||||
|
<file alias="index.theme">icons_light/index.theme</file>
|
||||||
|
<file alias="16x16/checked.png">icons_light/16x16/checked.png</file>
|
||||||
|
<file alias="16x16/failed.png">icons_light/16x16/failed.png</file>
|
||||||
|
<file alias="16x16/connected.png">icons_light/16x16/connected.png</file>
|
||||||
|
<file alias="16x16/disconnected.png">icons_light/16x16/disconnected.png</file>
|
||||||
|
<file alias="16x16/connected_notification.png">icons_light/16x16/connected_notification.png</file>
|
||||||
|
<file alias="16x16/lock.png">icons_light/16x16/lock.png</file>
|
||||||
|
<file alias="48x48/bad_folder.png">icons_light/48x48/bad_folder.png</file>
|
||||||
|
<file alias="48x48/chip.png">icons_light/48x48/chip.png</file>
|
||||||
|
<file alias="48x48/folder.png">icons_light/48x48/folder.png</file>
|
||||||
|
<file alias="48x48/no_avatar.png">icons_light/48x48/no_avatar.png</file>
|
||||||
|
<file alias="48x48/plus.png">icons_light/48x48/plus.png</file>
|
||||||
|
<file alias="48x48/sd_card.png">icons_light/48x48/sd_card.png</file>
|
||||||
|
<file alias="256x256/citra.png">icons_light/256x256/citra.png</file>
|
||||||
|
<file alias="48x48/star.png">icons_light/48x48/star.png</file>
|
||||||
|
<file alias="256x256/plus_folder.png">icons_light/256x256/plus_folder.png</file>
|
||||||
|
</qresource>
|
||||||
<qresource prefix="default">
|
<qresource prefix="default">
|
||||||
<file>style.qss</file>
|
<file>style.qss</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
|
<qresource prefix="default_with_light_icons">
|
||||||
|
<file>style.qss</file>
|
||||||
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@ -3477,9 +3477,20 @@ void GMainWindow::filterBarSetChecked(bool state) {
|
|||||||
emit(OnToggleFilterBar());
|
emit(OnToggleFilterBar());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool isDarkMode() {
|
||||||
|
const auto scheme = QGuiApplication::styleHints()->colorScheme();
|
||||||
|
return scheme == Qt::ColorScheme::Dark;
|
||||||
|
}
|
||||||
|
|
||||||
void GMainWindow::UpdateUITheme() {
|
void GMainWindow::UpdateUITheme() {
|
||||||
const QString icons_base_path = QStringLiteral(":/icons/");
|
const QString icons_base_path = QStringLiteral(":/icons/");
|
||||||
const QString default_theme = QStringLiteral("default");
|
QString default_theme;
|
||||||
|
if (!isDarkMode()) {
|
||||||
|
default_theme = QStringLiteral("default");
|
||||||
|
} else {
|
||||||
|
default_theme = QStringLiteral("default_with_light_icons");
|
||||||
|
}
|
||||||
|
|
||||||
const QString default_theme_path = icons_base_path + default_theme;
|
const QString default_theme_path = icons_base_path + default_theme;
|
||||||
|
|
||||||
const QString& current_theme = UISettings::values.theme;
|
const QString& current_theme = UISettings::values.theme;
|
||||||
|