Experimental attempt to gain a little more horizontal space for the tool

2008-03-08  Sven Neumann  <sven@gimp.org>

	Experimental attempt to gain a little more horizontal space for
	the tool options:
	
	* app/widgets/gimptooloptionseditor.c: removed the shadow from 
the
	viewport and the border from the vbox.

	* app/widgets/gimpdockable.c: use a semibold label for the 
title.


svn path=/trunk/; revision=25065
This commit is contained in:
Sven Neumann 2008-03-08 14:33:16 +00:00 committed by Sven Neumann
parent 9026f4965f
commit 2cf19eacee
3 changed files with 41 additions and 11 deletions

View File

@ -1,3 +1,13 @@
2008-03-08 Sven Neumann <sven@gimp.org>
Experimental attempt to gain a little more horizontal space for
the tool options:
* app/widgets/gimptooloptionseditor.c: removed the shadow from the
viewport and the border from the vbox.
* app/widgets/gimpdockable.c: use a semibold label for the title.
2008-03-08 Sven Neumann <sven@gimp.org>
* app/tools/gimpflipoptions.c

View File

@ -451,9 +451,11 @@ gimp_dockable_create_title_layout (GimpDockable *dockable,
GtkWidget *widget,
gint width)
{
PangoLayout *layout;
GtkBin *bin = GTK_BIN (dockable);
gchar *title = NULL;
PangoLayout *layout;
PangoAttrList *attrs;
PangoAttribute *attr;
GtkBin *bin = GTK_BIN (dockable);
gchar *title = NULL;
if (bin->child)
title = gimp_docked_get_title (GIMP_DOCKED (bin->child));
@ -462,6 +464,16 @@ gimp_dockable_create_title_layout (GimpDockable *dockable,
title ? title : dockable->blurb);
g_free (title);
attrs = pango_attr_list_new ();
attr = pango_attr_weight_new (PANGO_WEIGHT_SEMIBOLD);
attr->start_index = 0;
attr->end_index = -1;
pango_attr_list_insert (attrs, attr);
pango_layout_set_attributes (layout, attrs);
pango_attr_list_unref (attrs);
if (width > 0)
{
pango_layout_set_width (layout, PANGO_SCALE * width);

View File

@ -106,7 +106,8 @@ gimp_tool_options_editor_class_init (GimpToolOptionsEditorClass *klass)
static void
gimp_tool_options_editor_init (GimpToolOptionsEditor *editor)
{
GtkWidget *sw;
GtkScrolledWindow *scrolled_window;
GtkWidget *viewport;
gtk_widget_set_size_request (GTK_WIDGET (editor), -1, 200);
@ -115,18 +116,25 @@ gimp_tool_options_editor_init (GimpToolOptionsEditor *editor)
gimp_tool_options_editor_drop_tool,
editor);
editor->scrolled_window = sw = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
editor->scrolled_window = gtk_scrolled_window_new (NULL, NULL);
scrolled_window = GTK_SCROLLED_WINDOW (editor->scrolled_window);
gtk_scrolled_window_set_policy (scrolled_window,
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_container_add (GTK_CONTAINER (editor), sw);
gtk_widget_show (sw);
gtk_container_add (GTK_CONTAINER (editor), editor->scrolled_window);
gtk_widget_show (editor->scrolled_window);
viewport = gtk_viewport_new (gtk_scrolled_window_get_hadjustment (scrolled_window),
gtk_scrolled_window_get_vadjustment (scrolled_window));
gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport), GTK_SHADOW_NONE);
gtk_container_add (GTK_CONTAINER (scrolled_window), viewport);
gtk_widget_show (viewport);
/* The vbox containing the tool options */
editor->options_vbox = gtk_vbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (editor->options_vbox), 2);
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (sw),
editor->options_vbox);
gtk_container_add (GTK_CONTAINER (viewport), editor->options_vbox);
gtk_widget_show (editor->options_vbox);
editor->save_queue = NULL;