From 61a69153eec93f50acdc322a5f52406ac79fcb85 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 30 Mar 2011 13:35:11 +0000 Subject: Have ui::ListItem respect the disabled() state. --- src/ui/listitem.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/ui/listitem.cc') 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(parent()))->selected() == this)) { + if (disabled()) { + Paint::set_color(palette()->disabled()); + } else if (has_mouse_focus() || ((static_cast(parent()))->selected() == this)) { Paint::set_color(palette()->highlight()); } else { Paint::set_color(palette()->foreground()); -- cgit v1.2.3