[gimp] Bug 597368 - Widget spacing around canvas steals working space



commit 8ba9700ddb8664512124fdfaeb72eae13c8430cb
Author: Martin Nordholts <martinn src gnome org>
Date:   Sat Jan 30 08:59:28 2010 +0100

    Bug 597368 - Widget spacing around canvas steals working space
    
    Remove spacing between the canvas and the surrounding widgets so that
    that space can be used for the actual canvas itself instead.

 app/display/gimpdisplayshell-appearance.c |   18 ------------------
 app/display/gimpdisplayshell.c            |    8 +++-----
 2 files changed, 3 insertions(+), 23 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-appearance.c b/app/display/gimpdisplayshell-appearance.c
index 8c98564..3bc5bbd 100644
--- a/app/display/gimpdisplayshell-appearance.c
+++ b/app/display/gimpdisplayshell-appearance.c
@@ -167,7 +167,6 @@ gimp_display_shell_set_show_rulers (GimpDisplayShell *shell,
                                     gboolean          show)
 {
   GimpDisplayOptions *options;
-  GtkTable           *table;
 
   g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
 
@@ -175,15 +174,10 @@ gimp_display_shell_set_show_rulers (GimpDisplayShell *shell,
 
   g_object_set (options, "show-rulers", show, NULL);
 
-  table = GTK_TABLE (gtk_widget_get_parent (GTK_WIDGET (shell->canvas)));
-
   gtk_widget_set_visible (shell->origin, show);
   gtk_widget_set_visible (shell->hrule, show);
   gtk_widget_set_visible (shell->vrule, show);
 
-  gtk_table_set_col_spacing (table, 0, show ? 1 : 0);
-  gtk_table_set_row_spacing (table, 0, show ? 1 : 0);
-
   appearance_set_action_active (shell, "view-show-rulers", show);
 }
 
@@ -200,9 +194,6 @@ gimp_display_shell_set_show_scrollbars (GimpDisplayShell *shell,
                                         gboolean          show)
 {
   GimpDisplayOptions *options;
-  GtkWidget          *parent;
-  GtkBox             *hbox;
-  GtkBox             *vbox;
 
   g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
 
@@ -210,21 +201,12 @@ gimp_display_shell_set_show_scrollbars (GimpDisplayShell *shell,
 
   g_object_set (options, "show-scrollbars", show, NULL);
 
-  parent = gtk_widget_get_parent (shell->vsb);
-  hbox   = GTK_BOX (gtk_widget_get_parent (parent));
-
-  parent = gtk_widget_get_parent (shell->hsb);
-  vbox   = GTK_BOX (gtk_widget_get_parent (parent));
-
   gtk_widget_set_visible (shell->nav_ebox, show);
   gtk_widget_set_visible (shell->hsb, show);
   gtk_widget_set_visible (shell->vsb, show);
   gtk_widget_set_visible (shell->quick_mask_button, show);
   gtk_widget_set_visible (shell->zoom_button, show);
 
-  gtk_box_set_spacing (hbox, show ? 1 : 0);
-  gtk_box_set_spacing (vbox, show ? 1 : 0);
-
   appearance_set_action_active (shell, "view-show-scrollbars", show);
 }
 
diff --git a/app/display/gimpdisplayshell.c b/app/display/gimpdisplayshell.c
index a2df6f4..dddca53 100644
--- a/app/display/gimpdisplayshell.c
+++ b/app/display/gimpdisplayshell.c
@@ -293,8 +293,6 @@ gimp_display_shell_init (GimpDisplayShell *shell)
                                               GDK_VISIBILITY_NOTIFY_MASK   |
                                               GDK_SCROLL_MASK));
 
-  gtk_box_set_spacing (GTK_BOX (shell), 1);
-
   /*  zoom model callback  */
   g_signal_connect_swapped (shell->zoom, "zoomed",
                             G_CALLBACK (gimp_display_shell_scale_changed),
@@ -427,14 +425,14 @@ gimp_display_shell_constructor (GType                  type,
   /*  first, set up the container hierarchy  *********************************/
 
   /*  a hbox for the inner_table and the vertical scrollbar  */
-  upper_hbox = gtk_hbox_new (FALSE, 1);
+  upper_hbox = gtk_hbox_new (FALSE, 0);
   gtk_box_pack_start (GTK_BOX (shell), upper_hbox, TRUE, TRUE, 0);
   gtk_widget_show (upper_hbox);
 
   /*  the table containing origin, rulers and the canvas  */
   inner_table = gtk_table_new (2, 2, FALSE);
-  gtk_table_set_col_spacing (GTK_TABLE (inner_table), 0, 1);
-  gtk_table_set_row_spacing (GTK_TABLE (inner_table), 0, 1);
+  gtk_table_set_col_spacing (GTK_TABLE (inner_table), 0, 0);
+  gtk_table_set_row_spacing (GTK_TABLE (inner_table), 0, 0);
   gtk_box_pack_start (GTK_BOX (upper_hbox), inner_table, TRUE, TRUE, 0);
   gtk_widget_show (inner_table);
 



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