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

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
This commit is contained in:
Sergey Bugaev 2020-01-05 00:09:35 +03:00 committed by Andreas Kling
parent 7557251fac
commit 0f42908073
5 changed files with 14 additions and 10 deletions

View file

@ -10,6 +10,7 @@
#include <LibHTML/CSS/StyleSheet.h>
#include <LibHTML/DOM/ParentNode.h>
class Palette;
class CTimer;
class Frame;
class HTMLBodyElement;
@ -60,7 +61,7 @@ public:
Frame* frame() { return m_frame.ptr(); }
const Frame* frame() const { return m_frame.ptr(); }
Color background_color() const;
Color background_color(const Palette&) const;
RefPtr<GraphicsBitmap> background_image() const;
Color link_color() const { return m_link_color; }