[gtk+] infobar: set default border/spacing on action/content areas
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] infobar: set default border/spacing on action/content areas
- Date: Mon, 7 May 2012 22:07:00 +0000 (UTC)
commit a4d76439e6d99630319cf5c87633887fb6e9c08f
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon May 7 17:34:46 2012 -0400
infobar: set default border/spacing on action/content areas
Commit cdf473ec100d23ea6a9a8750ad301307a116b674 deprecated the style
properties associated with the container border width and box spacing of
the action and content areas, in favour of using
gtk_container_set_border_width() and gtk_box_set_spacing() on the
widgets themselves, but failed to initialize those values to the
defaults.
gtk/gtkinfobar.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkinfobar.c b/gtk/gtkinfobar.c
index 6b74e31..26a4995 100644
--- a/gtk/gtkinfobar.c
+++ b/gtk/gtkinfobar.c
@@ -145,6 +145,10 @@ enum
static guint signals[LAST_SIGNAL];
+#define ACTION_AREA_DEFAULT_BORDER 5
+#define ACTION_AREA_DEFAULT_SPACING 6
+#define CONTENT_AREA_DEFAULT_BORDER 8
+#define CONTENT_AREA_DEFAULT_SPACING 16
static void gtk_info_bar_set_property (GObject *object,
guint prop_id,
@@ -467,7 +471,7 @@ gtk_info_bar_class_init (GtkInfoBarClass *klass)
P_("Width of border around the content area"),
0,
G_MAXINT,
- 8,
+ CONTENT_AREA_DEFAULT_BORDER,
GTK_PARAM_READABLE));
/**
@@ -485,7 +489,7 @@ gtk_info_bar_class_init (GtkInfoBarClass *klass)
P_("Spacing between elements of the area"),
0,
G_MAXINT,
- 16,
+ CONTENT_AREA_DEFAULT_SPACING,
GTK_PARAM_READABLE));
/**
@@ -502,7 +506,7 @@ gtk_info_bar_class_init (GtkInfoBarClass *klass)
P_("Spacing between buttons"),
0,
G_MAXINT,
- 6,
+ ACTION_AREA_DEFAULT_SPACING,
GTK_PARAM_READABLE));
/**
@@ -519,7 +523,7 @@ gtk_info_bar_class_init (GtkInfoBarClass *klass)
P_("Width of border around the action area"),
0,
G_MAXINT,
- 5,
+ ACTION_AREA_DEFAULT_BORDER,
GTK_PARAM_READABLE));
binding_set = gtk_binding_set_by_class (klass);
@@ -557,6 +561,12 @@ gtk_info_bar_init (GtkInfoBar *info_bar)
info_bar->priv->content_area = content_area;
info_bar->priv->action_area = action_area;
+ /* set default spacings */
+ gtk_box_set_spacing (GTK_BOX (info_bar->priv->action_area), ACTION_AREA_DEFAULT_SPACING);
+ gtk_container_set_border_width (GTK_CONTAINER (info_bar->priv->action_area), ACTION_AREA_DEFAULT_BORDER);
+ gtk_box_set_spacing (GTK_BOX (info_bar->priv->content_area), CONTENT_AREA_DEFAULT_SPACING);
+ gtk_container_set_border_width (GTK_CONTAINER (info_bar->priv->content_area), CONTENT_AREA_DEFAULT_BORDER);
+
/* message-type is a CONSTRUCT property, so we init to a value
* different from its default to trigger its property setter
* during construction */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]