comparison browser_side/menu.py @ 220:09e4de9df5b7

browser side: enforced "gwt-MenuBar-horizontal" style in LiberviaMenuBar to workaround a class name fix in Pyjamas' MenuBar which was causing troubles with CSS.
author Goffi <goffi@goffi.org>
date Sat, 21 Sep 2013 15:37:29 +0200
parents 4e6467efd6bf
children dec76d4536ad
comparison
equal deleted inserted replaced
219:36673d19c87e 220:09e4de9df5b7
56 56
57 class LiberviaMenuBar(MenuBar): 57 class LiberviaMenuBar(MenuBar):
58 58
59 def __init__(self): 59 def __init__(self):
60 MenuBar.__init__(self, vertical=False) 60 MenuBar.__init__(self, vertical=False)
61 self.setStyleName('gwt-MenuBar-horizontal') # XXX: workaround for the Pyjamas' class name fix (it's now "gwt-MenuBar gwt-MenuBar-horizontal")
62 # TODO: properly adapt CSS to the new class name
61 63
62 def doItemAction(self, item, fireCommand): 64 def doItemAction(self, item, fireCommand):
63 MenuBar.doItemAction(self, item, fireCommand) 65 MenuBar.doItemAction(self, item, fireCommand)
64 if item == self.items[-1] and self.popup: 66 if item == self.items[-1] and self.popup:
65 self.popup.setPopupPosition(Window.getClientWidth() - 67 self.popup.setPopupPosition(Window.getClientWidth() -