Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Unified Diff: views/controls/menu/native_menu_gtk.cc

Issue 650074: New network menu button UI for ChromeOS.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/status/network_menu_button.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/menu/native_menu_gtk.cc
===================================================================
--- views/controls/menu/native_menu_gtk.cc (revision 39463)
+++ views/controls/menu/native_menu_gtk.cc (working copy)
@@ -7,6 +7,7 @@
#include <map>
#include <string>
+#include "app/gfx/font.h"
#include "app/gfx/gtk_util.h"
#include "app/menus/menu_model.h"
#include "base/keyboard_code_conversion_gtk.h"
@@ -231,6 +232,16 @@
break;
}
+ // Label font.
+ const gfx::Font* font = model_->GetLabelFontAt(index);
+ if (font) {
+ // The label item is the first child of the menu item.
+ GtkWidget* label_widget = GTK_BIN(menu_item)->child;
+ DCHECK(label_widget && GTK_IS_LABEL(label_widget));
+ gtk_widget_modify_font(GTK_WIDGET(label_widget),
sky 2010/02/19 23:34:14 You don't need GTK_WIDGET() here, just label_widge
+ gfx::Font::PangoFontFromGfxFont(*font));
+ }
+
if (type == menus::MenuModel::TYPE_SUBMENU) {
Menu2* submenu = new Menu2(model_->GetSubmenuModelAt(index));
static_cast<NativeMenuGtk*>(submenu->wrapper_.get())->set_parent(this);
« no previous file with comments | « chrome/browser/chromeos/status/network_menu_button.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698