diff options
author | Owen Taylor <otaylor@src.gnome.org> | 1998-04-08 05:28:56 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1998-04-08 05:28:56 +0000 |
commit | 55f36bac3acbeb04115455b025c6d597abd92426 (patch) | |
tree | 0fe7b181516e07212f0351e51b948284df580673 /examples/gtkdial | |
parent | 3d19b7ce55885a50df575f52aadc18d47fab235c (diff) | |
download | gdk-pixbuf-55f36bac3acbeb04115455b025c6d597abd92426.tar.gz |
Fix to dial test allocation. Make wheelbarrow not flash window
before setting shape mask.
Diffstat (limited to 'examples/gtkdial')
-rw-r--r-- | examples/gtkdial/gtkdial.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/gtkdial/gtkdial.c b/examples/gtkdial/gtkdial.c index ef0f1a5d8..db759be5d 100644 --- a/examples/gtkdial/gtkdial.c +++ b/examples/gtkdial/gtkdial.c @@ -253,17 +253,18 @@ gtk_dial_size_allocate (GtkWidget *widget, g_return_if_fail (allocation != NULL); widget->allocation = *allocation; + dial = GTK_DIAL (widget); + if (GTK_WIDGET_REALIZED (widget)) { - dial = GTK_DIAL (widget); gdk_window_move_resize (widget->window, allocation->x, allocation->y, allocation->width, allocation->height); - dial->radius = MAX(allocation->width,allocation->height) * 0.45; - dial->pointer_width = dial->radius / 5; } + dial->radius = MIN(allocation->width,allocation->height) * 0.45; + dial->pointer_width = dial->radius / 5; } static gint |