Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2011-07-30 13:36:45 +0000
committerStijn Buys <ingar@osirion.org>2011-07-30 13:36:45 +0000
commitb492615fb68e5c97fce87bcc946e92f115cfc3a2 (patch)
treeeb90e46894bd351332f64874babc5cef3959a2bd /src/ui/iconbutton.cc
parent3a28abfa64d02b8d530689c425f6ed476a14fe9c (diff)
Added support for tiled ui materials, changed default widget backgrounds to use ui materials.
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()