mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 10:17:34 +00:00
Taskbar: Add hotkeys for theme selector menu
This commit is contained in:
parent
420da686b8
commit
8e76265b0c
24 changed files with 51 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -296,6 +296,7 @@ ErrorOr<Core::AnonymousBuffer> load_system_theme(ByteString const& path, Optiona
|
|||
|
||||
struct SystemThemeMetaData {
|
||||
ByteString name;
|
||||
ByteString menu_name;
|
||||
ByteString path;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue