diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2004-05-27 03:31:17 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2004-05-27 03:31:17 +0000 |
commit | 310fd268e7498582755fd21bcf5428794a832bc0 (patch) | |
tree | 9323eafee5beacd4743fd73599b1a82a11658958 /gtk/gtkcellrenderertoggle.c | |
parent | 7c200f8a9c9985c483f6293d79d8b4192e2e6a4a (diff) | |
download | gtk+-310fd268e7498582755fd21bcf5428794a832bc0.tar.gz |
Support insensitive cells in tree views and combo boxes.
Diffstat (limited to 'gtk/gtkcellrenderertoggle.c')
-rw-r--r-- | gtk/gtkcellrenderertoggle.c | 6 |
1 files changed, 5 insertions, 1 deletions
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; |