mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 19:55:06 +00:00
LibGUI: Remove some header dependencies from Widget.h
This commit is contained in:
parent
08cae2773d
commit
34c7322d77
36 changed files with 86 additions and 35 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue