1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 06:38:10 +00:00

Taskbar: Add hotkeys for theme selector menu

This commit is contained in:
Hugh Davenport 2024-01-03 17:20:42 +13:00 committed by Andrew Kaster
parent 420da686b8
commit 8e76265b0c
24 changed files with 51 additions and 4 deletions

View file

@ -204,7 +204,9 @@ ErrorOr<Vector<SystemThemeMetaData>> list_installed_system_themes()
while (dt.has_next()) {
auto theme_name = dt.next_path();
auto theme_path = ByteString::formatted("/res/themes/{}", theme_name);
TRY(system_themes.try_append({ LexicalPath::title(theme_name), theme_path }));
auto config_file = TRY(Core::ConfigFile::open(theme_path));
auto menu_name = config_file->read_entry("Menu", "Name", theme_name);
TRY(system_themes.try_append({ LexicalPath::title(theme_name), menu_name, theme_path }));
}
quick_sort(system_themes, [](auto& a, auto& b) { return a.name < b.name; });
return system_themes;