Beispiel #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)
Beispiel #2
0
 def on_vertical_center_changed(self, v):
     if v: self.top = self.bottom = const('')
Beispiel #3
0
 def on_horizontal_center_changed(self, v):
     if v: self.left = self.right = const('')
Beispiel #4
0
 def on_center_changed(self, v):
     self.fill = self.left = self.right = self.top = self.bottom = const('')
Beispiel #5
0
 def on_bottom_changed(self, v):
     if self.fill != v: self.fill = const('')
     if v: self.center = const('')
Beispiel #6
0
 def on_right_changed(self, v):
     if self.fill != v: self.fill = const('')
     if v: self.center = const('')
Beispiel #7
0
 def on_fill_changed(self, v):
     self.left = self.right = self.top = self.bottom = const(v)
     self.center = ''