mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:37:35 +00:00
ThemeEditor: Save theme metrics and paths to file
Prior this change, custom title metrics seen in the Basalt theme and custom icon paths in Redmond themes were dropped when saving a file. Now any entry, even empty, will be saved. This may end up with slightly larger files, but on other hand, users will be able to see every option in a text editor, without a need to look at the code/docs.
This commit is contained in:
parent
d1e1096bc0
commit
8f36429cb5
1 changed files with 10 additions and 0 deletions
|
@ -145,6 +145,16 @@ int main(int argc, char** argv)
|
|||
theme->write_entry("Colors", to_string(role), preview_widget.preview_palette().color(role).to_string());
|
||||
}
|
||||
|
||||
#define __ENUMERATE_METRIC_ROLE(role) \
|
||||
theme->write_num_entry("Metrics", #role, preview_widget.preview_palette().metric(Gfx::MetricRole::role));
|
||||
ENUMERATE_METRIC_ROLES(__ENUMERATE_METRIC_ROLE)
|
||||
#undef __ENUMERATE_METRIC_ROLE
|
||||
|
||||
#define __ENUMERATE_PATH_ROLE(role) \
|
||||
theme->write_entry("Paths", #role, preview_widget.preview_palette().path(Gfx::PathRole::role));
|
||||
ENUMERATE_PATH_ROLES(__ENUMERATE_PATH_ROLE)
|
||||
#undef __ENUMERATE_PATH_ROLE
|
||||
|
||||
theme->sync();
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue