diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-04-02 15:51:28 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-04-02 15:51:28 +0000 |
commit | c944151a3cecd2ab199d1645e22d74fe9a66df0a (patch) | |
tree | e5719998626f9ff28d2fce5c88ff2de3c5d7bb43 /gtk/gtkradiobutton.c | |
parent | 5d1ee0929e0c4fb6cdbfa7a4bf28e2071da9a220 (diff) | |
download | gdk-pixbuf-c944151a3cecd2ab199d1645e22d74fe9a66df0a.tar.gz |
Fix G_VALUE_NO_COPY_CONTENTS instead of G_SIGNAL_TYPE_STATIC_SCOPE
Mon Apr 2 10:47:57 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_class_init): Fix
G_VALUE_NO_COPY_CONTENTS instead of G_SIGNAL_TYPE_STATIC_SCOPE
stupidity.
Mon Apr 2 00:51:11 2001 Owen Taylor <otaylor@redhat.com>
[ First pass at adding style properties. Still needs some definite
fine-tuning. ]
* gtk/gtkbutton.c: Add ::default_spacing style property.
* gtk/gtkcheckbutton.[ch] gtkradiobutton.c: Add ::indicator_size,
::indicator_spacing style properties.
* gtk/gtkoptionmenu.c: Add ::indicator_size, ::indicator_spacing
style properties.
* gtk/gtk{,h,v}paned.[ch]: Make handle_size a style property
rather than a normal property.
* gtk/gtkwidget.c: Add an ::interior_focus style property to
draw focus inside buttons, in the Windows/Java Metal/etc. style.
* gtk/gtkbutton.c gtk/gtkcheckbutton.c gtk/gtktogglenbutton.c:
Honor ::interior_focus.
* gtk/gtkentry.c: Don't draw focus at all when ::interior_focus is
TRUE.
* gtk/gtkrange.[ch] gtk/gtk{h,v}scrollbar.c gtk/gtk{h,v}scale.c:
Add ::slider_width, ::trough_border, ::stepper_size,
::stepper_spacing style properties.
* gtk/gtkscale.[ch] Add ::slider-length style property.
Diffstat (limited to 'gtk/gtkradiobutton.c')
-rw-r--r-- | gtk/gtkradiobutton.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gtk/gtkradiobutton.c b/gtk/gtkradiobutton.c index e231f51f9..b3294bf7a 100644 --- a/gtk/gtkradiobutton.c +++ b/gtk/gtkradiobutton.c @@ -375,8 +375,8 @@ gtk_radio_button_draw_indicator (GtkCheckButton *check_button, GtkShadowType shadow_type; GdkRectangle restrict_area; GdkRectangle new_area; - gint width, height; gint x, y; + gint indicator_size, indicator_spacing; g_return_if_fail (check_button != NULL); g_return_if_fail (GTK_IS_RADIO_BUTTON (check_button)); @@ -392,6 +392,8 @@ gtk_radio_button_draw_indicator (GtkCheckButton *check_button, (state_type != GTK_STATE_PRELIGHT)) state_type = GTK_STATE_NORMAL; + _gtk_check_button_get_props (check_button, &indicator_size, &indicator_spacing); + restrict_area.x = widget->allocation.x + GTK_CONTAINER (widget)->border_width; restrict_area.y = widget->allocation.y + GTK_CONTAINER (widget)->border_width; restrict_area.width = widget->allocation.width - ( 2 * GTK_CONTAINER (widget)->border_width); @@ -407,10 +409,8 @@ gtk_radio_button_draw_indicator (GtkCheckButton *check_button, new_area.width, new_area.height); } - x = widget->allocation.x + GTK_CHECK_BUTTON_GET_CLASS (widget)->indicator_spacing + GTK_CONTAINER (widget)->border_width; - y = widget->allocation.y + (widget->allocation.height - GTK_CHECK_BUTTON_GET_CLASS (widget)->indicator_size) / 2; - width = GTK_CHECK_BUTTON_GET_CLASS (widget)->indicator_size; - height = GTK_CHECK_BUTTON_GET_CLASS (widget)->indicator_size; + x = widget->allocation.x + indicator_spacing + GTK_CONTAINER (widget)->border_width; + y = widget->allocation.y + (widget->allocation.height - indicator_size) / 2; if (GTK_TOGGLE_BUTTON (widget)->active) shadow_type = GTK_SHADOW_IN; @@ -421,11 +421,11 @@ gtk_radio_button_draw_indicator (GtkCheckButton *check_button, shadow_type = GTK_SHADOW_ETCHED_IN; if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) - x = widget->allocation.x + widget->allocation.width - (width + x - widget->allocation.x); + x = widget->allocation.x + widget->allocation.width - (indicator_size + x - widget->allocation.x); gtk_paint_option (widget->style, widget->window, GTK_WIDGET_STATE (widget), shadow_type, area, widget, "radiobutton", - x, y, width, height); + x, y, indicator_size, indicator_size); } } |