diff --git a/ChangeLog b/ChangeLog index ed518a3254..78379f0e08 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-09-02 Sven Neumann + + * app/tools/gimptextoptions.c + * app/widgets/gimpwidgets-utils.[ch]: dropped the labels from text + tool options that have icons. Reduces visual clutter. + 2005-09-02 Sven Neumann * app/display/gimpdisplayshell-callbacks.c diff --git a/app/tools/gimptextoptions.c b/app/tools/gimptextoptions.c index b8ec9c6236..851f4aea99 100644 --- a/app/tools/gimptextoptions.c +++ b/app/tools/gimptextoptions.c @@ -476,22 +476,19 @@ gimp_text_options_gui (GimpToolOptions *tool_options) spinbutton = gimp_prop_spin_button_new (config, "indent", 1.0, 10.0, 1); gtk_entry_set_width_chars (GTK_ENTRY (spinbutton), 5); - gimp_table_attach_aligned (GTK_TABLE (table), 0, row++, - _("Indent:"), 0.0, 0.5, - spinbutton, 1, FALSE); + gimp_table_attach_stock (GTK_TABLE (table), row++, + GTK_STOCK_INDENT, spinbutton, 1, TRUE); spinbutton = gimp_prop_spin_button_new (config, "line-spacing", 1.0, 10.0, 1); gtk_entry_set_width_chars (GTK_ENTRY (spinbutton), 5); gimp_table_attach_stock (GTK_TABLE (table), row++, - _("Line\nspacing:"), 0.0, - spinbutton, 1, GIMP_STOCK_LINE_SPACING); + GIMP_STOCK_LINE_SPACING, spinbutton, 1, TRUE); spinbutton = gimp_prop_spin_button_new (config, "letter-spacing", 1.0, 10.0, 1); gtk_entry_set_width_chars (GTK_ENTRY (spinbutton), 5); gimp_table_attach_stock (GTK_TABLE (table), row++, - _("Letter\nspacing:"), 0.0, - spinbutton, 1, GIMP_STOCK_LETTER_SPACING); + GIMP_STOCK_LETTER_SPACING, spinbutton, 1, TRUE); button = gtk_button_new_with_label (_("Create Path from Text")); gtk_box_pack_end (GTK_BOX (vbox), button, FALSE, FALSE, 0); diff --git a/app/widgets/gimpwidgets-utils.c b/app/widgets/gimpwidgets-utils.c index 3002b69e43..13ba8cd482 100644 --- a/app/widgets/gimpwidgets-utils.c +++ b/app/widgets/gimpwidgets-utils.c @@ -197,46 +197,36 @@ gimp_button_menu_position (GtkWidget *button, void gimp_table_attach_stock (GtkTable *table, gint row, - const gchar *label_text, - gdouble yalign, + const gchar *stock_id, GtkWidget *widget, gint colspan, - const gchar *stock_id) + gboolean left_align) { GtkWidget *image; - GtkWidget *label; g_return_if_fail (GTK_IS_TABLE (table)); - g_return_if_fail (label_text != NULL); - - label = gtk_label_new_with_mnemonic (label_text); - - gtk_misc_set_alignment (GTK_MISC (label), 0.0, yalign); - gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); - gtk_table_attach (table, label, 0, 1, row, row + 1, - GTK_FILL, GTK_FILL, 0, 0); - gtk_widget_show (label); - - if (widget) - { - g_return_if_fail (GTK_IS_WIDGET (widget)); - - gtk_table_attach (table, widget, 1, 1 + colspan, row, row + 1, - GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); - gtk_widget_show (widget); - - gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); - } + g_return_if_fail (stock_id != NULL); + g_return_if_fail (GTK_IS_WIDGET (widget)); image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON); + gtk_misc_set_alignment (GTK_MISC (image), 1.0, 0.5); + gtk_table_attach (table, image, 0, 1, row, row + 1, + GTK_FILL, GTK_FILL, 0, 0); + gtk_widget_show (image); - if (image) + if (left_align) { - gtk_misc_set_alignment (GTK_MISC (image), 0.0, 0.5); - gtk_table_attach (table, image, 1 + colspan, 2 + colspan, row, row + 1, - GTK_SHRINK | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); - gtk_widget_show (image); + GtkWidget *hbox = gtk_hbox_new (FALSE, 0); + + gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0); + gtk_widget_show (widget); + + widget = hbox; } + + gtk_table_attach (table, widget, 1, 1 + colspan, row, row + 1, + GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); + gtk_widget_show (widget); } void diff --git a/app/widgets/gimpwidgets-utils.h b/app/widgets/gimpwidgets-utils.h index aef562c6f4..7ca538d9b5 100644 --- a/app/widgets/gimpwidgets-utils.h +++ b/app/widgets/gimpwidgets-utils.h @@ -34,11 +34,10 @@ void gimp_button_menu_position (GtkWidget *button, void gimp_table_attach_stock (GtkTable *table, gint row, - const gchar *label_text, - gdouble yalign, + const gchar *stock_id, GtkWidget *widget, gint colspan, - const gchar *stock_id); + gboolean left_align); void gimp_enum_radio_frame_add (GtkFrame *frame, GtkWidget *widget, gint enum_value);