diff options
author | Sergey Bugaev <bugaevc@gmail.com> | 2020-01-05 00:09:35 +0300 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2020-01-05 10:21:15 +0100 |
commit | 0f429080736e8a863a688d34c713cfe1a468dd53 (patch) | |
tree | c7cbd9a3bcf86ea4cf5ee32fca44fb4eae033a91 /Libraries/LibHTML/HtmlView.cpp | |
parent | 7557251fac4476a224bc07bd838eab9037f73e92 (diff) | |
download | serenity-0f429080736e8a863a688d34c713cfe1a468dd53.zip |
LibHTML: Respect the system theme
LibHTML will now use the palette colors for the default document background and
the text. As always, a page can override this default styling with CSS if it
really wants a specific color or style.
Fixes https://github.com/SerenityOS/serenity/issues/963
Diffstat (limited to 'Libraries/LibHTML/HtmlView.cpp')
-rw-r--r-- | Libraries/LibHTML/HtmlView.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibHTML/HtmlView.cpp b/Libraries/LibHTML/HtmlView.cpp index db6f094317..655a194916 100644 --- a/Libraries/LibHTML/HtmlView.cpp +++ b/Libraries/LibHTML/HtmlView.cpp @@ -38,7 +38,7 @@ HtmlView::HtmlView(GWidget* parent) set_frame_shadow(FrameShadow::Sunken); set_frame_thickness(2); set_should_hide_unnecessary_scrollbars(true); - set_background_color(Color::White); + set_background_role(ColorRole::Base); } HtmlView::~HtmlView() @@ -122,7 +122,7 @@ void HtmlView::paint_event(GPaintEvent& event) return; } - painter.fill_rect(event.rect(), document()->background_color()); + painter.fill_rect(event.rect(), document()->background_color(palette())); if (auto background_bitmap = document()->background_image()) { painter.draw_tiled_bitmap(event.rect(), *background_bitmap); |