[gtk+] spinner: Define desired size at top of file
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] spinner: Define desired size at top of file
- Date: Mon, 13 Sep 2010 23:29:00 +0000 (UTC)
commit 5ba6295a100c0c9ad6ebcd7e44ed356e41ea9dd8
Author: Benjamin Otte <otte redhat com>
Date: Tue Sep 14 01:09:53 2010 +0200
spinner: Define desired size at top of file
No magic numbers in the code please
gtk/gtkspinner.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkspinner.c b/gtk/gtkspinner.c
index 2b3a53b..7f4233f 100644
--- a/gtk/gtkspinner.c
+++ b/gtk/gtkspinner.c
@@ -55,6 +55,8 @@
G_DEFINE_TYPE (GtkSpinner, gtk_spinner, GTK_TYPE_DRAWING_AREA);
+#define SPINNER_SIZE 12
+
enum {
PROP_0,
PROP_ACTIVE
@@ -228,8 +230,8 @@ gtk_spinner_expose (GtkWidget *widget,
width = allocation.width;
height = allocation.height;
- if ((width < 12) || (height <12))
- gtk_widget_set_size_request (widget, 12, 12);
+ if ((width < SPINNER_SIZE) || (height < SPINNER_SIZE))
+ gtk_widget_set_size_request (widget, SPINNER_SIZE, SPINNER_SIZE);
state_type = GTK_STATE_NORMAL;
if (!gtk_widget_is_sensitive (widget))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]