Add Widget::onSetColor()

This commit is contained in:
David Capello 2014-04-17 15:46:01 -03:00
parent 6ca003feb0
commit ff277dccf7
2 changed files with 13 additions and 3 deletions

View File

@ -167,6 +167,12 @@ void Widget::setFont(FONT* f)
invalidate();
}
void Widget::setBgColor(ui::Color color)
{
m_bgColor = color;
onSetBgColor();
}
void Widget::setTheme(Theme* theme)
{
m_theme = theme;
@ -1384,6 +1390,11 @@ void Widget::onSetText()
invalidate();
}
void Widget::onSetBgColor()
{
invalidate();
}
void Widget::offsetWidgets(int dx, int dy)
{
m_bounds.offset(dx, dy);

View File

@ -175,9 +175,7 @@ namespace ui {
}
// Sets the background color of the widget
void setBgColor(ui::Color bg_color) {
m_bgColor = bg_color;
}
void setBgColor(ui::Color color);
Theme* getTheme() const { return m_theme; }
void setTheme(Theme* theme);
@ -376,6 +374,7 @@ namespace ui {
virtual void onSelect();
virtual void onDeselect();
virtual void onSetText();
virtual void onSetBgColor();
private:
base::string m_id; // Widget's id