Check Box Patch



Hi,

I had a problem with the checkbox where users were winging that it was
hard to see sometimes when the check box was pushed in or not. So i
changed the color in the style to red so it was easier to see when
depressed. This was quite simple, however, when the mouse was moved over
the top the whole thing went the the prelight color, even the depressed
button. I have enclosed a patch that sets the depressed button to the
color stored in the selected state of bg when the mouse is over the
widget. Not sure if it will want to be used or not. It is applied to
0.99.10.

Also, just resubmitting a question I asked the other day but received no
response to yet. It has to do with the tooltips widget. I've got a
tooltip associated with a progress bar, but when the progress bar
updates (which in my program is once a second), it draws over the
tooltip. I was wondering if there was a way to force the redraw of the
tooltip or to prevent the progres bar from overwriting the tooltip in
the first place.

Thanks,

Warwick Mitchell
--- gtk+-0.99.10/gtk/gtkcheckbutton.c.orig	Mon Apr 13 18:16:56 1998
+++ gtk+-0.99.10/gtk/gtkcheckbutton.c	Mon Apr 13 18:18:10 1998
@@ -367,6 +367,10 @@
       else
 	shadow_type = GTK_SHADOW_OUT;
 
+      state_type = GTK_WIDGET_STATE (widget);
+      if ((state_type == GTK_STATE_PRELIGHT) && (toggle_button->active))
+       state_type = GTK_STATE_SELECTED;
+
       gdk_draw_rectangle (widget->window,
 			  widget->style->bg_gc[GTK_WIDGET_STATE (widget)],
 			  TRUE, x + 1, y + 1, width, height);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]