Ejemplo n.º 1
0
 def GetDynamicHeight(node, width):
     return max(
         32,
         EveLabelMedium.MeasureTextSize(node.description,
                                        width=width - 60)[1] +
         EveLabelMediumBold.MeasureTextSize(node.title,
                                            width=width - 60)[1] + 8)
Ejemplo n.º 2
0
 def SetSizeAutomatically(self):
     width = self.displayRect[2]
     height = EveLabelMediumBold.MeasureTextSize(
         self.text.text,
         width=width - 40)[1] + EveLabelLargeBold.MeasureTextSize(
             self.label.text, width=width - 40)[1]
     self.height = height