Re: [Gimp-developer] [Patch] Less cluttered UI, on-demand showing of docking bars
Martin Nordholts wrote: Hi In current GIMP the docking bars are always visible even though they are only useful when rearranging the GIMP UI. I have attached a fairly simple patch (you need latest trunk) that hides these by default and only shows them when a dockable-drag is started. They are hidden again when the dockable-drag is completed. As this turned out to be a quite complicated UI problem to solve in a good way (especialy after some conversation on IRC) I have decided to postpone further hacking on it and aim for getting this finalized some other time (currently the aim is GIMP 2.10). I have filed a bug report to prevent the patch from getting lost: Bug 567221 – Only show docking bars when needed, not all the time http://bugzilla.gnome.org/show_bug.cgi?id=567221 - Martin ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] [Patch] Less cluttered UI, on-demand showing of docking bars
On Sun, 2009-01-04 at 12:38 +0100, Martin Nordholts wrote: In current GIMP the docking bars are always visible even though they are only useful when rearranging the GIMP UI. I have attached a fairly simple patch (you need latest trunk) that hides these by default and only shows them when a dockable-drag is started. They are hidden again when the dockable-drag is completed. For better understanding, look at this before- and after-patch-applied screenshot that shows a dock when GIMP has started: http://www.chromecode.com/temp/gimp-on-demand-docking-2009-01-03.png This is not a trivial UI change so I want to probe for comments on this list before possibly applying. Any objections to me applying it? Any suggestions for improvement? I like this very much - it's much cleaner. Now the dockability is advertised with a tool tip while hoovering over the docking bar. How will the new version do this? How important is this? When a dockable-drag is started, the docking targets should be visible prominently, not only the bar in it's current version. Perhaps even as a bubbles floating on top of the targets. Rolf Steinort http://meetthegimp.org - Weekly videopodcast about GIMP ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] [Patch] Less cluttered UI, on-demand showing of docking bars
Martin Nordholts wrote: I have attached a new patch That was a lie, here is the patch. - Martin Index: app/widgets/gimpdock.c === --- app/widgets/gimpdock.c (revision 27881) +++ app/widgets/gimpdock.c (working copy) @@ -76,6 +76,9 @@ struct _GimpDockPriv GList *dockbooks; gint ID; /* for themeing */ + + GtkWidget *north_separator; + GtkWidget *south_separator; }; @@ -102,6 +105,8 @@ static void gimp_dock_real_book_add GimpDockbook *dockbook); static void gimp_dock_real_book_removed (GimpDock *dock, GimpDockbook *dockbook); +static void gimp_dock_show_separators (GimpDock *dock, + gboolean show); G_DEFINE_TYPE (GimpDock, gimp_dock, GIMP_TYPE_WINDOW) @@ -110,6 +115,8 @@ G_DEFINE_TYPE (GimpDock, gimp_dock, GIMP static guint dock_signals[LAST_SIGNAL] = { 0 }; +static GList *dock_instances = NULL; + static void gimp_dock_class_init (GimpDockClass *klass) @@ -185,7 +192,6 @@ static void gimp_dock_init (GimpDock *dock) { static gint dock_ID = 1; - GtkWidget *separator; gchar *name; dock-priv = G_TYPE_INSTANCE_GET_PRIVATE (dock, @@ -212,9 +218,9 @@ gimp_dock_init (GimpDock *dock) gtk_container_add (GTK_CONTAINER (dock-priv-main_vbox), dock-priv-vbox); gtk_widget_show (dock-priv-vbox); - separator = gimp_dock_separator_new (dock, GTK_ANCHOR_NORTH); - gtk_box_pack_start (GTK_BOX (dock-priv-vbox), separator, FALSE, FALSE, 0); - gtk_widget_show (separator); + dock-priv-north_separator = gimp_dock_separator_new (dock, GTK_ANCHOR_NORTH); + gtk_box_pack_start (GTK_BOX (dock-priv-vbox), dock-priv-north_separator, FALSE, FALSE, 0); + gimp_dock_separator_set_show_label (GIMP_DOCK_SEPARATOR (dock-priv-north_separator), TRUE); } static GObject * @@ -236,6 +242,8 @@ gimp_dock_constructor (GType config = GIMP_GUI_CONFIG (dock-priv-context-gimp-config); gimp_window_set_hint (GTK_WINDOW (dock), config-dock_window_hint); + + dock_instances = g_list_prepend (dock_instances, dock); return object; } @@ -293,6 +301,8 @@ gimp_dock_destroy (GtkObject *object) { GimpDock *dock = GIMP_DOCK (object); + dock_instances = g_list_remove (dock_instances, dock); + while (dock-priv-dockbooks) gimp_dock_remove_book (dock, GIMP_DOCKBOOK (dock-priv-dockbooks-data)); @@ -401,6 +411,21 @@ gimp_dock_real_book_removed (GimpDock gtk_widget_destroy (GTK_WIDGET (dock)); } +static void +gimp_dock_show_separators (GimpDock *dock, + gboolean show) +{ + if (dock-priv-north_separator) +g_object_set (dock-priv-north_separator, + visible, show, + NULL); + + if (dock-priv-south_separator) +g_object_set (dock-priv-south_separator, + visible, show, + NULL); +} + /* public functions */ @@ -534,14 +559,12 @@ gimp_dock_add_book (GimpDock *dock, if (old_length == 0) { - GtkWidget *separator; - gtk_box_pack_start (GTK_BOX (dock-priv-vbox), GTK_WIDGET (dockbook), TRUE, TRUE, 0); - separator = gimp_dock_separator_new (dock, GTK_ANCHOR_SOUTH); - gtk_box_pack_end (GTK_BOX (dock-priv-vbox), separator, FALSE, FALSE, 0); - gtk_widget_show (separator); + dock-priv-south_separator = gimp_dock_separator_new (dock, GTK_ANCHOR_SOUTH); + gtk_box_pack_end (GTK_BOX (dock-priv-vbox), dock-priv-south_separator, FALSE,FALSE, 0); + gimp_dock_separator_set_show_label (GIMP_DOCK_SEPARATOR (dock-priv-south_separator), TRUE); } else { @@ -624,15 +647,13 @@ gimp_dock_remove_book (GimpDock *doc if (old_length == 1) { - GtkWidget *separator; GList *children; children = gtk_container_get_children (GTK_CONTAINER (dock-priv-vbox)); - separator = g_list_nth_data (children, 2); - - gtk_container_remove (GTK_CONTAINER (dock-priv-vbox), separator); + gtk_container_remove (GTK_CONTAINER (dock-priv-vbox), dock-priv-south_separator); gtk_container_remove (GTK_CONTAINER (dock-priv-vbox), GTK_WIDGET (dockbook)); + dock-priv-south_separator = NULL; g_list_free (children); } @@ -669,3 +690,19 @@ gimp_dock_remove_book (GimpDock *doc g_object_unref (dockbook); } + +void +gimp_dock_class_show_separators (GimpDockClass *klass, + gboolean show) +{ + GList *list; + + g_return_if_fail (GIMP_IS_DOCK_CLASS (klass)); + + for (list = dock_instances; list != NULL; list = list-next) +{ + GimpDock *dock = GIMP_DOCK (list-data); + + gimp_dock_show_separators (dock, show); +} +} Index:
Re: [Gimp-developer] [Patch] Less cluttered UI, on-demand showing of docking bars
On Sunday 04 January 2009 17:35:42 Martin Nordholts wrote: Updated screenshot: http://www.chromecode.com/temp/gimp-on-demand-docking-2009-01-03-1627.png Now THAT I like. As a NOOB I had serous problems realizing that the thin bars indicate a drop site and their thinness made them hard to hit later. Now both of these are solved making that much easier for a noob to understand and use. --Alexia ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] [Patch] Less cluttered UI, on-demand showing of docking bars
Alexia Death-2 wrote: Now THAT I like. As a NOOB I had serous problems realizing that the thin bars indicate a drop site and their thinness made them hard to hit later. Now both of these are solved making that much easier for a noob to understand and use. --Alexia I had the same problems. In fact, while it might be a bit tacky, making the docking bars (or the text inside them) blink while dragging would add even more emphasis. Without a tool tip, a noob might accidentally initiate a dockable drag, then realize that is not what he/she wants and just let go of the dialog, without ever noticing that the docking bars had appeared. Flashing would help draw their attention to this feature. -- View this message in context: http://www.nabble.com/-Patch--Less-cluttered-UI%2C-on-demand-showing-of-docking-bars-tp21275229p21278456.html Sent from the Gimp Developer mailing list archive at Nabble.com. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] [Patch] Less cluttered UI, on-demand showing of docking bars
Martin Nordholts wrote: Rolf Steinort wrote: On Sun, 2009-01-04 at 12:38 +0100, Martin Nordholts wrote: In current GIMP the docking bars are always visible even though they are only useful when rearranging the GIMP UI. I have attached a fairly simple patch (you need latest trunk) that hides these by default and only shows them when a dockable-drag is started. They are hidden again when the dockable-drag is completed. Now the dockability is advertised with a tool tip while hoovering over the docking bar. How will the new version do this? How important is this? When a dockable-drag is started, the docking targets should be visible prominently, not only the bar in it's current version. Perhaps even as a bubbles floating on top of the targets. The lost opportunity of the docking bar tooltip is good point but I think we and the users can live without that tooltip. Another good point is that there is no point in having the docking bars microscopically small any longer so I have attached a new patch that makes them larger. You need to make install in $GIMP_SRC_ROOT/themes in order for the change in docking bar height to take effect. I also fixed another issue with trying to hide a destroyed docking bar. Updated screenshot: http://www.chromecode.com/temp/gimp-on-demand-docking-2009-01-03-1627.png Sorry for nitpicking here, but perhaps it would look nicer if the text was center-aligned in the drop-box. Other than that, looks great! - Andreas ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer