1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:57:43 +00:00

ThemeEditor: Actually save alignment roles

This commit is contained in:
Sam Atkins 2022-05-05 17:48:24 +01:00 committed by Andreas Kling
parent 8915b3227c
commit 0ef3c15822

View file

@ -392,6 +392,11 @@ void MainWidget::set_path(String path)
void MainWidget::save_to_file(Core::File& file)
{
auto theme = Core::ConfigFile::open(file.filename(), file.leak_fd()).release_value_but_fixme_should_propagate_errors();
for (auto role : m_alignment_roles) {
theme->write_entry("Alignments", to_string(role), to_string(m_preview_widget->preview_palette().alignment(role)));
}
for (auto role : m_color_roles) {
theme->write_entry("Colors", to_string(role), m_preview_widget->preview_palette().color(role).to_string());
}