Merge 3ff4b640ff43324f3a0414411561000968b5223a into 42d77cd720eb42845c2afb77c6d7157e02c8c325

This commit is contained in:
Kleidis 2025-03-13 02:50:51 +01:00 committed by GitHub
commit 214b201b73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
19 changed files with 48 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 657 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 926 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 658 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View 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

View File

@ -17,7 +17,28 @@
<file alias="48x48/star.png">icons/48x48/star.png</file>
<file alias="256x256/plus_folder.png">icons/256x256/plus_folder.png</file>
</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">
<file>style.qss</file>
</qresource>
<qresource prefix="default_with_light_icons">
<file>style.qss</file>
</qresource>
</RCC>

View File

@ -3488,9 +3488,20 @@ void GMainWindow::filterBarSetChecked(bool state) {
emit(OnToggleFilterBar());
}
inline bool isDarkMode() {
const auto scheme = QGuiApplication::styleHints()->colorScheme();
return scheme == Qt::ColorScheme::Dark;
}
void GMainWindow::UpdateUITheme() {
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& current_theme = UISettings::values.theme;

View File

@ -7,8 +7,8 @@
namespace UISettings {
const Themes themes{{
{"Light", "default"},
{"Light Colorful", "colorful"},
{"System", "default"},
{"System With Colorful Icons", "colorful"},
{"Dark", "qdarkstyle"},
{"Dark Colorful", "colorful_dark"},
{"Midnight Blue", "qdarkstyle_midnight_blue"},