From 9dd8754fa8a24451a07002b248c4775378e30b3e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Johannes=20Dahlstr=C3=B6m?= Date: Wed, 26 Feb 2014 15:20:55 +0200 Subject: [PATCH] Support font icons in MenuItems (#13372) Change-Id: I2a85f77f68d701baa804bd3e6d55fa737bb4cc0e --- client/src/com/vaadin/client/ui/VMenuBar.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/client/src/com/vaadin/client/ui/VMenuBar.java b/client/src/com/vaadin/client/ui/VMenuBar.java index 6c994777a7..b6aee92779 100644 --- a/client/src/com/vaadin/client/ui/VMenuBar.java +++ b/client/src/com/vaadin/client/ui/VMenuBar.java @@ -226,11 +226,9 @@ public class VMenuBar extends SimpleFocusablePanel implements itemHTML.append(""); - if (item.hasAttribute("icon")) { - itemHTML.append("\"\""); + Icon icon = client.getIcon(item.getStringAttribute("icon")); + if (icon != null) { + itemHTML.append(icon.getElement().getString()); } String itemText = item.getStringAttribute("text"); if (!htmlContentAllowed) { -- 2.39.5