Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/iconbutton.cc')
-rw-r--r--src/ui/iconbutton.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ui/iconbutton.cc b/src/ui/iconbutton.cc
index 83c7aa7..22a7c14 100644
--- a/src/ui/iconbutton.cc
+++ b/src/ui/iconbutton.cc
@@ -70,18 +70,19 @@ void IconButton::set_icon(const std::string &icon)
void IconButton::draw()
{
+ math::Color color;
if (!icon().size())
return;
if (disabled()) {
- Paint::set_color(palette()->disabled());
+ color.assign(palette()->disabled());
} else if (highlight() || has_mouse_focus()) {
- Paint::set_color(palette()->highlight());
+ color.assign(palette()->highlight());
} else {
- Paint::set_color(palette()->foreground());
+ color.assign(palette()->foreground());
}
- Paint::draw_bitmap(global_location(), size(), icon());
+ Paint::draw_bitmap(global_location(), size(), color, icon());
}
void IconButton::draw_border()