diff browser_side/xmlui.py @ 392:f539f6f8ee9c

browser_side: standardize the dialogs size and buttons display: - do not set a default width/height for the XMLUI dialogs - do not display an extra "Close" button when XMLUI form is showed - the buttons order is OK/Save on the left, Cancel/Close on the right - horizontally center the dialog buttons
author souliane <souliane@mailoo.org>
date Mon, 03 Mar 2014 16:24:00 +0100
parents 76583fab7ea0
children 0c4547587637
line wrap: on
line diff
--- a/browser_side/xmlui.py	Mon Mar 03 15:44:54 2014 +0100
+++ b/browser_side/xmlui.py	Mon Mar 03 16:24:00 2014 +0100
@@ -364,6 +364,7 @@
         self.setCellHeight(self.main_cont, '100%')
         if self.type == 'form':
             hpanel = HorizontalPanel()
+            hpanel.setStyleName('marginAuto')
             hpanel.add(Button('Submit',self.onFormSubmitted))
             if not 'NO_CANCEL' in self.flags:
                 hpanel.add(Button('Cancel',self.onFormCancelled))
@@ -371,6 +372,6 @@
         elif self.type == 'param':
             assert(isinstance(self.children[0][0],TabPanel))
             hpanel = HorizontalPanel()
+            hpanel.add(Button('Save', self.onSaveParams))
             hpanel.add(Button('Cancel', lambda ignore: self._xmluiClose()))
-            hpanel.add(Button('Save', self.onSaveParams))
             self.add(hpanel)