[gimp/gimp-2-8] Bug 686929 - Newly created toolbox is too tall and too narrow



commit 6dcd7c425e3283f6c4d0549981c6f11126198b84
Author: Michael Natterer <mitch gimp org>
Date:   Thu Jan 17 19:37:03 2013 +0100

    Bug 686929 - Newly created toolbox is too tall and too narrow
    
    Set the dock window's geometry hints after the tool palette's style is
    known, not after the toolbox' style is known, so we get the right tool
    button dimensions for minimum size and size increments.
    (cherry picked from commit 7e273bc6d0d51300c2fafca355c729170689f2ca)

 app/widgets/gimptoolbox.c     |   15 ---------------
 app/widgets/gimptoolpalette.c |    2 ++
 2 files changed, 2 insertions(+), 15 deletions(-)
---
diff --git a/app/widgets/gimptoolbox.c b/app/widgets/gimptoolbox.c
index 17d9625..b3dee39 100644
--- a/app/widgets/gimptoolbox.c
+++ b/app/widgets/gimptoolbox.c
@@ -98,8 +98,6 @@ static void        gimp_toolbox_get_property            (GObject        *object,
                                                          GParamSpec     *pspec);
 static void        gimp_toolbox_size_allocate           (GtkWidget      *widget,
                                                          GtkAllocation  *allocation);
-static void        gimp_toolbox_style_set               (GtkWidget      *widget,
-                                                         GtkStyle       *previous_style);
 static gboolean    gimp_toolbox_button_press_event      (GtkWidget      *widget,
                                                          GdkEventButton *event);
 static void        gimp_toolbox_drag_leave              (GtkWidget      *widget,
@@ -166,7 +164,6 @@ gimp_toolbox_class_init (GimpToolboxClass *klass)
   object_class->get_property          = gimp_toolbox_get_property;
 
   widget_class->size_allocate         = gimp_toolbox_size_allocate;
-  widget_class->style_set             = gimp_toolbox_style_set;
   widget_class->button_press_event    = gimp_toolbox_button_press_event;
 
   dock_class->get_description         = gimp_toolbox_get_description;
@@ -329,9 +326,6 @@ gimp_toolbox_constructed (GObject *object)
                            toolbox->p->image_area, 0);
 
   gimp_toolbox_dnd_init (GIMP_TOOLBOX (toolbox), toolbox->p->vbox);
-
-  gimp_toolbox_style_set (GTK_WIDGET (toolbox),
-                          gtk_widget_get_style (GTK_WIDGET (toolbox)));
 }
 
 static void
@@ -443,15 +437,6 @@ gimp_toolbox_size_allocate (GtkWidget     *widget,
     }
 }
 
-static void
-gimp_toolbox_style_set (GtkWidget *widget,
-                        GtkStyle  *previous_style)
-{
-  GTK_WIDGET_CLASS (parent_class)->style_set (widget, previous_style);
-
-  gimp_dock_invalidate_geometry (GIMP_DOCK (widget));
-}
-
 static gboolean
 gimp_toolbox_button_press_event (GtkWidget      *widget,
                                  GdkEventButton *event)
diff --git a/app/widgets/gimptoolpalette.c b/app/widgets/gimptoolpalette.c
index 61d4a1e..ab92e55 100644
--- a/app/widgets/gimptoolpalette.c
+++ b/app/widgets/gimptoolpalette.c
@@ -208,6 +208,8 @@ gimp_tool_palette_style_set (GtkWidget *widget,
           gtk_button_set_relief (GTK_BUTTON (button), relief);
         }
     }
+
+  gimp_dock_invalidate_geometry (GIMP_DOCK (private->toolbox));
 }
 
 GtkWidget *



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