comparison browser_side/card_game.py @ 238:dec76d4536ad

browser_side: set CSS margin: auto for all button panels
author souliane <souliane@mailoo.org>
date Fri, 11 Oct 2013 15:40:29 +0200
parents 9763dec220ed
children 63e9b680d3e7
comparison
equal deleted inserted replaced
237:531b8809d1ab 238:dec76d4536ad
71 for contrat in ['Passe', 'Petite', 'Garde', 'Garde Sans', 'Garde Contre']: 71 for contrat in ['Passe', 'Petite', 'Garde', 'Garde Sans', 'Garde Contre']:
72 self.contrats_list.addItem(contrat) 72 self.contrats_list.addItem(contrat)
73 self.contrats_list.setSelectedIndex(0) 73 self.contrats_list.setSelectedIndex(0)
74 content.add(self.contrats_list) 74 content.add(self.contrats_list)
75 button_panel = HorizontalPanel() 75 button_panel = HorizontalPanel()
76 button_panel.addStyleName("marginAuto")
76 self.choose_button = Button("Choose", self.onChoose) 77 self.choose_button = Button("Choose", self.onChoose)
77 button_panel.add(self.choose_button) 78 button_panel.add(self.choose_button)
78 content.add(button_panel) 79 content.add(button_panel)
79 self.setHTML("Please select your contrat") 80 self.setHTML("Please select your contrat")
80 self.setWidget(content) 81 self.setWidget(content)
81 82
82 def onChoose(self, button): 83 def onChoose(self, button):
83 self.hide() 84 self.hide()
84 self._parent.contratSelected(self.contrats_list.getSelectedItemText()[0]) 85 self._parent.contratSelected(self.contrats_list.getSelectedItemText()[0])
85 86
86 class CardWidget(TarotCard, Image, MouseHandler): 87 class CardWidget(TarotCard, Image, MouseHandler):