From 310fd268e7498582755fd21bcf5428794a832bc0 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 27 May 2004 03:31:17 +0000 Subject: Support insensitive cells in tree views and combo boxes. --- gtk/gtkcellrenderertoggle.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gtk/gtkcellrenderertoggle.c') diff --git a/gtk/gtkcellrenderertoggle.c b/gtk/gtkcellrenderertoggle.c index 7c49318693..3b2a205ca7 100644 --- a/gtk/gtkcellrenderertoggle.c +++ b/gtk/gtkcellrenderertoggle.c @@ -348,7 +348,11 @@ gtk_cell_renderer_toggle_render (GtkCellRenderer *cell, else shadow = celltoggle->active ? GTK_SHADOW_IN : GTK_SHADOW_OUT; - if ((flags & GTK_CELL_RENDERER_SELECTED) == GTK_CELL_RENDERER_SELECTED) + if (!cell->sensitive) + { + state = GTK_STATE_INSENSITIVE; + } + else if ((flags & GTK_CELL_RENDERER_SELECTED) == GTK_CELL_RENDERER_SELECTED) { if (GTK_WIDGET_HAS_FOCUS (widget)) state = GTK_STATE_SELECTED; -- cgit v1.2.1