mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-04 08:46:09 +00:00
Add Widget::onSetColor()
This commit is contained in:
parent
6ca003feb0
commit
ff277dccf7
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user