summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/controls/menu/native_menu_gtk.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/views/controls/menu/native_menu_gtk.cc b/views/controls/menu/native_menu_gtk.cc
index feb7b0c..693570e 100644
--- a/views/controls/menu/native_menu_gtk.cc
+++ b/views/controls/menu/native_menu_gtk.cc
@@ -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 @@ GtkWidget* NativeMenuGtk::AddMenuItemAt(int index,
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(label_widget,
+ 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);