changeset 79:d57e0d6b1ced

browser side: inclusion of Adrien's icons
author Goffi <goffi@goffi.org>
date Sun, 19 Jun 2011 16:35:44 +0200
parents 12680e220b35
children 84d3b0decd3d
files browser_side/menu.py public/libervia.css
diffstat 2 files changed, 21 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/browser_side/menu.py	Sun Jun 19 01:33:29 2011 +0200
+++ b/browser_side/menu.py	Sun Jun 19 16:35:44 2011 +0200
@@ -69,6 +69,7 @@
         self.host = host
         SimplePanel.__init__(self)
         self.setStyleName('menuContainer')
+        _item_tpl = "<img src='media/icons/menu/%s_menu_red.png' />%s"
 
         menu_general = MenuBar(vertical=True)
         menu_general.addItem("Social contract", MenuCmd(self, "onSocialContract"))
@@ -86,14 +87,26 @@
         menu_games.addItem("Tarot", MenuCmd(self, "onTarotGame"))
         menu_games.addItem("Xiangqi", MenuCmd(self, "onXiangqiGame"))
 
+        menu_help = MenuBar(vertical=True)
+        
+        menu_settings = MenuBar(vertical=True)
+        
         menubar = LiberviaMenuBar()
-        menubar.addItem(MenuItem("General", menu_general))
-        menubar.addItem(MenuItem("Contacts", menu_contacts))
-        menubar.addItem(MenuItem("Groups", menu_group))
+        
+        for _name, _icon, _menu in [('General', 'home', menu_general),
+                                    ('Contacts', 'social', menu_contacts),
+                                    ('Groups', 'social', menu_group),
+                                    ('Games', 'games', menu_games)]:
+            menubar.addItem(MenuItem(_item_tpl % (_icon, _name), True, _menu))
+        
         _separator = MenuItem('', None)
         _separator.setStyleName('menuSeparator')
         menubar.addItem(_separator, None)
-        menubar.addItem(MenuItem("Games", True, menu_games))
+        
+        for _name, _icon, _menu in [('Help', 'help', menu_help),
+                                    ('Settings', 'settings', menu_settings)]:
+            menubar.addItem(MenuItem(_item_tpl % (_icon, _name), True, _menu))
+        
         self.add(menubar)
 
     #General menu
--- a/public/libervia.css	Sun Jun 19 01:33:29 2011 +0200
+++ b/public/libervia.css	Sun Jun 19 16:35:44 2011 +0200
@@ -143,6 +143,10 @@
     -o-transition: color 0.2s linear;
 }
 
+.gwt-MenuItem img {
+    padding-right: 2px;
+}
+
 .gwt-MenuBar-horizontal .gwt-MenuItem-selected {
     filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=’#eee’, endColorstr=’#aaa′);
     background: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#aaa));