added gimp_pango_layout_set_scale().

2008-09-30  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpwidgets-utils.[ch]: added
	gimp_pango_layout_set_scale().

	* app/gui/splash.c: set a smaller font size on the lower label.


svn path=/trunk/; revision=27088
This commit is contained in:
Sven Neumann 2008-09-30 11:16:28 +00:00 committed by Sven Neumann
parent 945fdb7cc0
commit ca0b070852
4 changed files with 34 additions and 2 deletions

View file

@ -1,3 +1,10 @@
2008-09-30 Sven Neumann <sven@gimp.org>
* app/widgets/gimpwidgets-utils.[ch]: added
gimp_pango_layout_set_scale().
* app/gui/splash.c: set a smaller font size on the lower label.
2008-09-30 Sven Neumann <sven@gimp.org>
* app/widgets/gimpwidgets-utils.c (gimp_pango_layout_set_weight):

View file

@ -158,9 +158,10 @@ splash_create (gboolean be_verbose)
/* create the pango layouts */
splash->upper = gtk_widget_create_pango_layout (splash->area, "");
splash->lower = gtk_widget_create_pango_layout (splash->area, "");
gimp_pango_layout_set_weight (splash->upper, PANGO_WEIGHT_SEMIBOLD);
gimp_pango_layout_set_weight (splash->upper, PANGO_WEIGHT_BOLD);
splash->lower = gtk_widget_create_pango_layout (splash->area, "");
gimp_pango_layout_set_scale (splash->lower, PANGO_SCALE_SMALL);
/* this sets the initial layout positions */
splash_position_layouts (splash, "", "", NULL);

View file

@ -1077,6 +1077,26 @@ gimp_get_message_stock_id (GimpMessageSeverity severity)
g_return_val_if_reached (GIMP_STOCK_WARNING);
}
void
gimp_pango_layout_set_scale (PangoLayout *layout,
gdouble scale)
{
PangoAttrList *attrs;
PangoAttribute *attr;
g_return_if_fail (PANGO_IS_LAYOUT (layout));
attrs = pango_attr_list_new ();
attr = pango_attr_scale_new (scale);
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);
}
void
gimp_pango_layout_set_weight (PangoLayout *layout,
PangoWeight weight)
@ -1084,6 +1104,8 @@ gimp_pango_layout_set_weight (PangoLayout *layout,
PangoAttrList *attrs;
PangoAttribute *attr;
g_return_if_fail (PANGO_IS_LAYOUT (layout));
attrs = pango_attr_list_new ();
attr = pango_attr_weight_new (weight);

View file

@ -90,6 +90,8 @@ void gimp_widget_set_accel_help (GtkWidget *widget,
const gchar * gimp_get_message_stock_id (GimpMessageSeverity severity);
void gimp_pango_layout_set_scale (PangoLayout *layout,
double scale);
void gimp_pango_layout_set_weight (PangoLayout *layout,
PangoWeight weight);