mirror of https://github.com/GNOME/gimp.git
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:
parent
945fdb7cc0
commit
ca0b070852
|
@ -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):
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue