mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 03:09:08 +00:00
LibGUI: Remove some header dependencies from Widget.h
This commit is contained in:
@@ -94,6 +94,8 @@ const WidgetClassRegistration* WidgetClassRegistration::find(const String& class
|
||||
|
||||
Widget::Widget(Widget* parent)
|
||||
: Core::Object(parent, true)
|
||||
, m_background_role(Gfx::ColorRole::Window)
|
||||
, m_foreground_role(Gfx::ColorRole::WindowText)
|
||||
, m_font(Gfx::Font::default_font())
|
||||
, m_palette(Application::the().palette().impl())
|
||||
{
|
||||
@@ -731,4 +733,19 @@ void Widget::set_palette(const Palette& palette)
|
||||
m_palette = palette.impl();
|
||||
}
|
||||
|
||||
void Widget::set_background_role(ColorRole role)
|
||||
{
|
||||
m_background_role = role;
|
||||
}
|
||||
|
||||
void Widget::set_foreground_role(ColorRole role)
|
||||
{
|
||||
m_foreground_role = role;
|
||||
}
|
||||
|
||||
Gfx::Palette Widget::palette() const
|
||||
{
|
||||
return Gfx::Palette(*m_palette);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user