Commit 5ba6295a authored by Benjamin Otte's avatar Benjamin Otte
Browse files

spinner: Define desired size at top of file

No magic numbers in the code please
parent ff29972a
...@@ -55,6 +55,8 @@ ...@@ -55,6 +55,8 @@
G_DEFINE_TYPE (GtkSpinner, gtk_spinner, GTK_TYPE_DRAWING_AREA); G_DEFINE_TYPE (GtkSpinner, gtk_spinner, GTK_TYPE_DRAWING_AREA);
#define SPINNER_SIZE 12
enum { enum {
PROP_0, PROP_0,
PROP_ACTIVE PROP_ACTIVE
...@@ -228,8 +230,8 @@ gtk_spinner_expose (GtkWidget *widget, ...@@ -228,8 +230,8 @@ gtk_spinner_expose (GtkWidget *widget,
width = allocation.width; width = allocation.width;
height = allocation.height; height = allocation.height;
if ((width < 12) || (height <12)) if ((width < SPINNER_SIZE) || (height < SPINNER_SIZE))
gtk_widget_set_size_request (widget, 12, 12); gtk_widget_set_size_request (widget, SPINNER_SIZE, SPINNER_SIZE);
state_type = GTK_STATE_NORMAL; state_type = GTK_STATE_NORMAL;
if (!gtk_widget_is_sensitive (widget)) if (!gtk_widget_is_sensitive (widget))
......
Supports Markdown
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