Commit 0dff033a authored by Tristan Van Berkom's avatar Tristan Van Berkom

Fixed GtkSpinner to request 12x12 at init time instead of at expose time.

This should not change the space taken by the spinner when hidden,
and it should only set the minimum size not the actual size (i.e. code
in place was conditionally setting it if not allocated 12x12, which
doesnt really make sense)... This fixes spinners showing at the correct size
in gtk-demo.
parent 4c1fa765
......@@ -211,6 +211,8 @@ gtk_spinner_init (GtkSpinner *spinner)
spinner->priv = priv;
gtk_widget_set_size_request (GTK_WIDGET (spinner), 12, 12);
gtk_widget_set_has_window (GTK_WIDGET (spinner), FALSE);
}
......@@ -220,16 +222,9 @@ gtk_spinner_expose (GtkWidget *widget,
{
GtkStateType state_type;
GtkSpinnerPrivate *priv;
int width, height;
priv = GTK_SPINNER (widget)->priv;
width = widget->allocation.width;
height = widget->allocation.height;
if ((width < 12) || (height <12))
gtk_widget_set_size_request (widget, 12, 12);
state_type = GTK_STATE_NORMAL;
if (!gtk_widget_is_sensitive (widget))
state_type = GTK_STATE_INSENSITIVE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment