[aisleriot] sol: Fixup dialogue padding alignment



commit 100f0c52067c0b6b5e90ee56aaea76deb74ad987
Author: Christian Persch <chpe gnome org>
Date:   Tue Mar 3 20:37:45 2015 +0100

    sol: Fixup dialogue padding alignment
    
    Not going to be fixed in gtk+, so work around this here.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=735242

 src/ar-game-chooser.c |    9 ++++++++-
 src/stats-dialog.c    |    9 ++++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/src/ar-game-chooser.c b/src/ar-game-chooser.c
index 686fb53..a055214 100644
--- a/src/ar-game-chooser.c
+++ b/src/ar-game-chooser.c
@@ -281,7 +281,7 @@ ar_game_chooser_constructor (GType type,
   GtkTreePath *path;
   char **games;
   int i;
-  GtkWidget *content_area;
+  GtkWidget *content_area, *action_area;
   GtkDialog *dialog;
 
   object = G_OBJECT_CLASS (ar_game_chooser_parent_class)->constructor
@@ -397,6 +397,13 @@ ar_game_chooser_constructor (GType type,
                                 0.5, 0.0);
   gtk_tree_path_free (path);
 
+  /* Fixup dialogue padding, #735242 */
+  action_area = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
+  gtk_widget_set_margin_left   (action_area, 5);
+  gtk_widget_set_margin_right  (action_area, 5);
+  gtk_widget_set_margin_top    (action_area, 5);
+  gtk_widget_set_margin_bottom (action_area, 5);
+
   return object;
 }
 
diff --git a/src/stats-dialog.c b/src/stats-dialog.c
index c649d72..88a5101 100644
--- a/src/stats-dialog.c
+++ b/src/stats-dialog.c
@@ -110,7 +110,7 @@ aisleriot_stats_dialog_init (AisleriotStatsDialog *stats_dialog)
 {
   AisleriotStatsDialogPrivate *priv;
   GtkDialog *dialog = GTK_DIALOG (stats_dialog);
-  GtkWidget *vbox, *hbox, *content_area;
+  GtkWidget *vbox, *hbox, *content_area, *action_area;
   GtkTable *table;
 
   priv = stats_dialog->priv = AISLERIOT_STATS_DIALOG_GET_PRIVATE (stats_dialog);
@@ -180,6 +180,13 @@ aisleriot_stats_dialog_init (AisleriotStatsDialog *stats_dialog)
 
   gtk_window_set_title (GTK_WINDOW (dialog), "");
   gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
+
+  /* Fixup dialogue padding, #735242 */
+  action_area = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
+  gtk_widget_set_margin_left   (action_area, 5);
+  gtk_widget_set_margin_right  (action_area, 5);
+  gtk_widget_set_margin_top    (action_area, 5);
+  gtk_widget_set_margin_bottom (action_area, 5);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]