From b492615fb68e5c97fce87bcc946e92f115cfc3a2 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 30 Jul 2011 13:36:45 +0000 Subject: Added support for tiled ui materials, changed default widget backgrounds to use ui materials. --- src/ui/iconbutton.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/ui/iconbutton.cc') 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() -- cgit v1.2.3