Esempio n. 1
0
 def on_margins_changed(self, v):
     if isinstance(v, int):
         self.left_margin = self.right_margin = \
             self.top_margin = self.bottom_margin = const(v)
     else:
         v = (list(v) + [0, 0, 0, 0])[:4]
         self.left_margin, self.top_margin, \
             self.right_margin, self.bottom_margin = consts(*v)
Esempio n. 2
0
 def on_vertical_center_changed(self, v):
     if v: self.top = self.bottom = const('')
Esempio n. 3
0
 def on_horizontal_center_changed(self, v):
     if v: self.left = self.right = const('')
Esempio n. 4
0
 def on_center_changed(self, v):
     self.fill = self.left = self.right = self.top = self.bottom = const('')
Esempio n. 5
0
 def on_bottom_changed(self, v):
     if self.fill != v: self.fill = const('')
     if v: self.center = const('')
Esempio n. 6
0
 def on_right_changed(self, v):
     if self.fill != v: self.fill = const('')
     if v: self.center = const('')
Esempio n. 7
0
 def on_fill_changed(self, v):
     self.left = self.right = self.top = self.bottom = const(v)
     self.center = ''