draw the standalone dockable like a notebook tab to indicate that it can

2005-12-29  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdockable.c (gimp_dockable_expose_event): draw the
	standalone dockable like a notebook tab to indicate that it can be
	dragged.
This commit is contained in:
Sven Neumann 2005-12-29 02:27:32 +00:00 committed by Sven Neumann
parent 720ce44272
commit 59fa7c4e25
2 changed files with 20 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2005-12-29 Sven Neumann <sven@gimp.org>
* app/widgets/gimpdockable.c (gimp_dockable_expose_event): draw the
standalone dockable like a notebook tab to indicate that it can be
dragged.
2005-12-29 Sven Neumann <sven@gimp.org> 2005-12-29 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimphelpui.c (gimp_help_set_help_data): allow to * libgimpwidgets/gimphelpui.c (gimp_help_set_help_data): allow to

View File

@ -450,6 +450,16 @@ gimp_dockable_expose_event (GtkWidget *widget,
GdkRectangle title_area; GdkRectangle title_area;
GdkRectangle expose_area; GdkRectangle expose_area;
if (! gtk_notebook_get_show_tabs (GTK_NOTEBOOK (dockable->dockbook)))
gtk_paint_extension (widget->style, widget->window,
widget->state, GTK_SHADOW_OUT,
&event->area, widget, "tab",
widget->allocation.x,
widget->allocation.y,
widget->allocation.width,
widget->allocation.height,
GTK_POS_BOTTOM);
gimp_dockable_get_title_area (dockable, &title_area); gimp_dockable_get_title_area (dockable, &title_area);
if (gdk_rectangle_intersect (&title_area, &event->area, &expose_area)) if (gdk_rectangle_intersect (&title_area, &event->area, &expose_area))
@ -476,11 +486,10 @@ gimp_dockable_expose_event (GtkWidget *widget,
if (bin->child) if (bin->child)
title = gimp_docked_get_title (GIMP_DOCKED (bin->child)); title = gimp_docked_get_title (GIMP_DOCKED (bin->child));
if (! title) dockable->title_layout =
title = g_strdup (dockable->blurb); gtk_widget_create_pango_layout (widget,
title ?
dockable->title_layout = gtk_widget_create_pango_layout (widget, title : dockable->blurb);
title);
g_free (title); g_free (title);
pango_layout_set_width (dockable->title_layout, pango_layout_set_width (dockable->title_layout,