Commit 664b5a0a authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

commented out the memory size label. The visual clutter of it's bold

2004-10-26  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimptemplateeditor.c: commented out the memory size
	label. The visual clutter of it's bold appearance was IMO not
	appropriate. I think the dialog is better without it.

	* app/widgets/gimpsizebox.c: added a pixel size label as in the
	Image New dialog.
parent c588e8e5
2004-10-26 Sven Neumann <sven@gimp.org>
* app/widgets/gimptemplateeditor.c: commented out the memory size
label. The visual clutter of it's bold appearance was IMO not
appropriate. I think the dialog is better without it.
* app/widgets/gimpsizebox.c: added a pixel size label as in the
Image New dialog.
2004-10-26 Sven Neumann <sven@gimp.org>
 
* tools/pdbgen/enumcode.pl: added gtk-doc comment for
......
......@@ -59,6 +59,7 @@ struct _GimpSizeBoxPrivate
{
GimpSizeEntry *entry;
GimpChainButton *chain;
GtkWidget *label;
gdouble aspect;
};
......@@ -80,6 +81,9 @@ static void gimp_size_box_get_property (GObject *object,
GValue *value,
GParamSpec *pspec);
static void gimp_size_box_update_label (GimpSizeBox *box,
GtkWidget *label);
static GtkVBoxClass *parent_class = NULL;
......@@ -183,11 +187,11 @@ gimp_size_box_constructor (GType type,
GimpSizeBox *box;
GtkWidget *entry;
GtkWidget *table;
GtkWidget *label;
GtkWidget *hbox;
GtkWidget *width;
GtkWidget *height;
GtkWidget *chain;
GtkWidget *label;
GtkObject *adjustment;
GimpSizeBoxPrivate *priv;
......@@ -195,7 +199,7 @@ gimp_size_box_constructor (GType type,
box = GIMP_SIZE_BOX (object);
table = gtk_table_new (3, 2, FALSE);
table = gtk_table_new (3, 3, FALSE);
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacing (GTK_TABLE (table), 0, 2);
......@@ -267,10 +271,21 @@ gimp_size_box_constructor (GType type,
gimp_help_set_help_data (GIMP_CHAIN_BUTTON (chain)->button,
_("Keep aspect ratio"), NULL);
label = gtk_label_new (NULL);
gimp_label_set_attributes (GTK_LABEL (label),
PANGO_ATTR_SCALE, PANGO_SCALE_SMALL,
-1);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
gtk_table_attach_defaults (GTK_TABLE (table), label, 1, 3, 2, 3);
gtk_widget_show (label);
gimp_size_box_update_label (box, label);
priv = GIMP_SIZE_BOX_GET_PRIVATE (box);
priv->entry = GIMP_SIZE_ENTRY (entry);
priv->chain = GIMP_CHAIN_BUTTON (chain);
priv->label = label;
priv->aspect = (gdouble) box->width / (gdouble) box->height;
return object;
......@@ -296,6 +311,7 @@ gimp_size_box_set_property (GObject *object,
if (box->height != height)
gimp_size_entry_set_refval (priv->entry, 1, height);
}
gimp_size_box_update_label (box, priv->label);
break;
case PROP_HEIGHT:
......@@ -307,6 +323,7 @@ gimp_size_box_set_property (GObject *object,
if (box->width != width)
gimp_size_entry_set_refval (priv->entry, 0, width);
}
gimp_size_box_update_label (box, priv->label);
break;
case PROP_UNIT:
......@@ -378,3 +395,17 @@ gimp_size_box_get_property (GObject *object,
break;
}
}
static void
gimp_size_box_update_label (GimpSizeBox *box,
GtkWidget *label)
{
if (label)
{
gchar *text;
text = g_strdup_printf (_("%d x %d pixels"), box->width, box->height);
gtk_label_set_text (GTK_LABEL (label), text);
g_free (text);
}
}
......@@ -316,6 +316,7 @@ gimp_template_editor_constructor (GType type,
gtk_box_pack_start (GTK_BOX (vbox), editor->more_label, FALSE, FALSE, 0);
gtk_widget_show (editor->more_label);
#ifdef ENABLE_MEMSIZE_LABEL
editor->memsize_label = gtk_label_new (NULL);
gimp_label_set_attributes (GTK_LABEL (editor->memsize_label),
PANGO_ATTR_SCALE, PANGO_SCALE_SMALL,
......@@ -324,6 +325,7 @@ gimp_template_editor_constructor (GType type,
gtk_misc_set_alignment (GTK_MISC (editor->memsize_label), 0.0, 0.0);
gtk_box_pack_start (GTK_BOX (vbox), editor->memsize_label, FALSE, FALSE, 0);
gtk_widget_show (editor->memsize_label);
#endif
text = g_strdup_printf ("<b>%s</b>", _("_Advanced Options"));
editor->expander = g_object_new (GTK_TYPE_EXPANDER,
......@@ -663,9 +665,11 @@ gimp_template_editor_template_notify (GimpTemplate *template,
}
}
#ifdef ENABLE_MEMSIZE_LABEL
text = gimp_memsize_to_string (template->initial_size);
gtk_label_set_text (GTK_LABEL (editor->memsize_label), text);
g_free (text);
#endif
text = g_strdup_printf (_("%d x %d pixels"),
template->width, template->height);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment