gimp r27088 - in trunk: . app/gui app/widgets
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r27088 - in trunk: . app/gui app/widgets
- Date: Tue, 30 Sep 2008 11:16:28 +0000 (UTC)
Author: neo
Date: Tue Sep 30 11:16:28 2008
New Revision: 27088
URL: http://svn.gnome.org/viewvc/gimp?rev=27088&view=rev
Log:
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.
Modified:
trunk/ChangeLog
trunk/app/gui/splash.c
trunk/app/widgets/gimpwidgets-utils.c
trunk/app/widgets/gimpwidgets-utils.h
Modified: trunk/app/gui/splash.c
==============================================================================
--- trunk/app/gui/splash.c (original)
+++ trunk/app/gui/splash.c Tue Sep 30 11:16:28 2008
@@ -158,9 +158,10 @@
/* 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);
Modified: trunk/app/widgets/gimpwidgets-utils.c
==============================================================================
--- trunk/app/widgets/gimpwidgets-utils.c (original)
+++ trunk/app/widgets/gimpwidgets-utils.c Tue Sep 30 11:16:28 2008
@@ -1078,12 +1078,34 @@
}
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)
{
PangoAttrList *attrs;
PangoAttribute *attr;
+ g_return_if_fail (PANGO_IS_LAYOUT (layout));
+
attrs = pango_attr_list_new ();
attr = pango_attr_weight_new (weight);
Modified: trunk/app/widgets/gimpwidgets-utils.h
==============================================================================
--- trunk/app/widgets/gimpwidgets-utils.h (original)
+++ trunk/app/widgets/gimpwidgets-utils.h Tue Sep 30 11:16:28 2008
@@ -90,6 +90,8 @@
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]