comparison browser_side/panels.py @ 89:8d2c7be09eef

browser side: CSS: removed useless z-indexes, and replaced tabs by spaces
author Goffi <goffi@goffi.org>
date Mon, 27 Jun 2011 20:10:29 +0200
parents 50b480fd0605
children 9729ed7171a6
comparison
equal deleted inserted replaced
88:50b480fd0605 89:8d2c7be09eef
144 self.__close_button_id = HTMLPanel.createUniqueId() 144 self.__close_button_id = HTMLPanel.createUniqueId()
145 header = AbsolutePanel() 145 header = AbsolutePanel()
146 self.__title = Label(title) 146 self.__title = Label(title)
147 self.__title.setStyleName('widgetHeader_title') 147 self.__title.setStyleName('widgetHeader_title')
148 header.add(self.__title) 148 header.add(self.__title)
149 #header.setCellVerticalAlignment(self.title, HasAlignment.ALIGN_MIDDLE)
150 #header.setCellWidth(self.title, '100%')
151 button_group_wrapper = SimplePanel() 149 button_group_wrapper = SimplePanel()
152 button_group_wrapper.setStyleName('widgetHeader_buttonsWrapper') 150 button_group_wrapper.setStyleName('widgetHeader_buttonsWrapper')
153 button_group = HorizontalPanel() 151 button_group = HorizontalPanel()
154 button_group.setStyleName('widgetHeader_buttonGroup') 152 button_group.setStyleName('widgetHeader_buttonGroup')
155 setting_button = Image("media/icons/misc/settings.png") 153 setting_button = Image("media/icons/misc/settings.png")
156 setting_button.setStyleName('widgetHeader_settingButton') 154 setting_button.setStyleName('widgetHeader_settingButton')
155 setting_button.addClickListener(self.onSetting)
157 close_button = Image("media/icons/misc/close.png") 156 close_button = Image("media/icons/misc/close.png")
158 close_button.setStyleName('widgetHeader_closeButton') 157 close_button.setStyleName('widgetHeader_closeButton')
159 close_button.addClickListener(getattr(self,"onClose")) 158 close_button.addClickListener(self.onClose)
160 button_group.add(setting_button) 159 button_group.add(setting_button)
161 button_group.add(close_button) 160 button_group.add(close_button)
162 button_group_wrapper.setWidget(button_group) 161 button_group_wrapper.setWidget(button_group)
163 header.add(button_group_wrapper) 162 header.add(button_group_wrapper)
164 self.add(header) 163 self.add(header)
174 173
175 def onClose(self, sender): 174 def onClose(self, sender):
176 print "onClose:", sender 175 print "onClose:", sender
177 _widgetspanel = self.getParent().getParent().getParent() 176 _widgetspanel = self.getParent().getParent().getParent()
178 _widgetspanel.removeWidget(self) 177 _widgetspanel.removeWidget(self)
178
179 def onSetting(self, sender):
180 Window.alert('settings')
179 181
180 def setTitle(self, text): 182 def setTitle(self, text):
181 """change the title in the header of the widget 183 """change the title in the header of the widget
182 @param text: text of the new title""" 184 @param text: text of the new title"""
183 self.__title.setText(text) 185 self.__title.setText(text)