[gnome-panel] Make clock bold



commit ad0d5f54100b1f3685f2535a668084f05ca4e6ae
Author: William Jon McCann <jmccann redhat com>
Date:   Wed Feb 16 16:31:33 2011 -0500

    Make clock bold
    
    https://bugzilla.gnome.org/show_bug.cgi?id=631553

 applets/clock/clock.c |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/applets/clock/clock.c b/applets/clock/clock.c
index 58f83db..f4b7ec8 100644
--- a/applets/clock/clock.c
+++ b/applets/clock/clock.c
@@ -1323,12 +1323,33 @@ create_main_clock_button (void)
         return button;
 }
 
+ static void
+_gtk_label_make_bold (GtkLabel *label)
+{
+        PangoFontDescription *font_desc;
+
+        font_desc = pango_font_description_new ();
+
+        pango_font_description_set_weight (font_desc,
+                                           PANGO_WEIGHT_BOLD);
+
+        /* This will only affect the weight of the font, the rest is
+         * from the current state of the widget, which comes from the
+         * theme or user prefs, since the font desc only has the
+         * weight flag turned on.
+         */
+        gtk_widget_modify_font (GTK_WIDGET (label), font_desc);
+
+        pango_font_description_free (font_desc);
+}
+
 static GtkWidget *
 create_main_clock_label (ClockData *cd)
 {
         GtkWidget *label;
 
         label = gtk_label_new (NULL);
+        _gtk_label_make_bold (GTK_LABEL (label));
 	g_signal_connect (label, "size_request",
 			  G_CALLBACK (clock_size_request),
 			  cd);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]