summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/AbstractThemePreview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibGUI/AbstractThemePreview.cpp')
-rw-r--r--Userland/Libraries/LibGUI/AbstractThemePreview.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/AbstractThemePreview.cpp b/Userland/Libraries/LibGUI/AbstractThemePreview.cpp
index 18a4e2c11c..743ce60a0e 100644
--- a/Userland/Libraries/LibGUI/AbstractThemePreview.cpp
+++ b/Userland/Libraries/LibGUI/AbstractThemePreview.cpp
@@ -78,6 +78,13 @@ void AbstractThemePreview::set_preview_palette(Gfx::Palette const& palette)
update();
}
+void AbstractThemePreview::set_theme(Core::AnonymousBuffer const& theme_buffer)
+{
+ VERIFY(theme_buffer.is_valid());
+ m_preview_palette = Gfx::Palette(Gfx::PaletteImpl::create_with_anonymous_buffer(theme_buffer));
+ set_preview_palette(m_preview_palette);
+}
+
void AbstractThemePreview::set_theme_from_file(Core::File& file)
{
auto config_file = Core::ConfigFile::open(file.filename(), file.leak_fd()).release_value_but_fixme_should_propagate_errors();