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-03-30 13:35:11 +0000
committerStijn Buys <ingar@osirion.org>2011-03-30 13:35:11 +0000
commit61a69153eec93f50acdc322a5f52406ac79fcb85 (patch)
tree505d438f6fb60c36b4fbd0802b591078e3223f51 /src/ui/listitem.cc
parent0936e6722a8a651a85343d42fa2fb802cfc567ef (diff)
Have ui::ListItem respect the disabled() state.
Diffstat (limited to 'src/ui/listitem.cc')
-rw-r--r--src/ui/listitem.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ui/listitem.cc b/src/ui/listitem.cc
index 8f445f1..c5cee32 100644
--- a/src/ui/listitem.cc
+++ b/src/ui/listitem.cc
@@ -43,7 +43,9 @@ void ListItem::draw()
if (!text().size())
return;
- if ( has_mouse_focus() || ((static_cast<ListView *>(parent()))->selected() == this)) {
+ if (disabled()) {
+ Paint::set_color(palette()->disabled());
+ } else if (has_mouse_focus() || ((static_cast<ListView *>(parent()))->selected() == this)) {
Paint::set_color(palette()->highlight());
} else {
Paint::set_color(palette()->foreground());