[gnome-panel] Boldify menubar labels in top panel



commit 84a149fd8d5893ae3847a979475b32130280e088
Author: William Jon McCann <jmccann redhat com>
Date:   Wed Feb 16 14:40:49 2011 -0500

    Boldify menubar labels in top panel
    
    https://bugzilla.gnome.org/show_bug.cgi?id=631553

 gnome-panel/panel-menu-bar.c |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/gnome-panel/panel-menu-bar.c b/gnome-panel/panel-menu-bar.c
index f369948..5674fb3 100644
--- a/gnome-panel/panel-menu-bar.c
+++ b/gnome-panel/panel-menu-bar.c
@@ -132,6 +132,26 @@ panel_menu_bar_setup_tooltip (PanelMenuBar *menubar)
 }
 
 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 void
 panel_menu_bar_init (PanelMenuBar *menubar)
 {
         GtkCssProvider *provider;
@@ -156,6 +176,7 @@ panel_menu_bar_init (PanelMenuBar *menubar)
 	menubar->priv->applications_item = panel_image_menu_item_new ();
 	gtk_menu_item_set_label (GTK_MENU_ITEM (menubar->priv->applications_item),
 				 _("Applications"));
+        _gtk_label_make_bold (GTK_LABEL (gtk_bin_get_child (GTK_BIN (menubar->priv->applications_item))));
 
 	gtk_menu_item_set_submenu (GTK_MENU_ITEM (menubar->priv->applications_item),
 				   menubar->priv->applications_menu);
@@ -163,12 +184,14 @@ panel_menu_bar_init (PanelMenuBar *menubar)
 			       menubar->priv->applications_item);
 
 	menubar->priv->places_item = panel_place_menu_item_new (FALSE);
+        _gtk_label_make_bold (GTK_LABEL (gtk_bin_get_child (GTK_BIN (menubar->priv->places_item))));
 	gtk_menu_shell_append (GTK_MENU_SHELL (menubar),
 			       menubar->priv->places_item);
 
 	menubar->priv->desktop_item = panel_desktop_menu_item_new (FALSE, TRUE);
 	gtk_menu_shell_append (GTK_MENU_SHELL (menubar),
 			       menubar->priv->desktop_item);
+        _gtk_label_make_bold (GTK_LABEL (gtk_bin_get_child (GTK_BIN (menubar->priv->desktop_item))));
 
 	panel_menu_bar_setup_tooltip (menubar);
 



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