Skip to content

Commit

Permalink
LibGUI: Add update() when changing widget color or palette
Browse files Browse the repository at this point in the history
  • Loading branch information
SpencerCDixon authored and awesomekling committed Jun 24, 2021
1 parent a2a3f52 commit 5b79d53
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Userland/Libraries/LibGUI/Widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -891,16 +891,19 @@ Vector<Widget&> Widget::child_widgets() const
void Widget::set_palette(const Palette& palette)
{
m_palette = palette.impl();
update();
}

void Widget::set_background_role(ColorRole role)
{
m_background_role = role;
update();
}

void Widget::set_foreground_role(ColorRole role)
{
m_foreground_role = role;
update();
}

Gfx::Palette Widget::palette() const
Expand Down

0 comments on commit 5b79d53

Please sign in to comment.