graphics/SFC_Objects.py
changeset 1 e9d01d824086
parent 0 b622defdfd98
child 2 93bc4c2cf376
equal deleted inserted replaced
0:b622defdfd98 1:e9d01d824086
  1275                     self.Pos.x + self.Size[0], self.Pos.y + i * SFC_ACTION_MIN_SIZE[1])
  1275                     self.Pos.x + self.Size[0], self.Pos.y + i * SFC_ACTION_MIN_SIZE[1])
  1276             text_width, text_height = dc.GetTextExtent(action["qualifier"])
  1276             text_width, text_height = dc.GetTextExtent(action["qualifier"])
  1277             if "duration" in action:
  1277             if "duration" in action:
  1278                 dc.DrawText(action["qualifier"], self.Pos.x + (colsize[0] - text_width) / 2,
  1278                 dc.DrawText(action["qualifier"], self.Pos.x + (colsize[0] - text_width) / 2,
  1279                     self.Pos.y + i * SFC_ACTION_MIN_SIZE[1] + SFC_ACTION_MIN_SIZE[1] / 2 - text_height)
  1279                     self.Pos.y + i * SFC_ACTION_MIN_SIZE[1] + SFC_ACTION_MIN_SIZE[1] / 2 - text_height)
  1280                 text_width, text_height = dc.GetTextExtent("T#%s"%action["duration"])
  1280                 text_width, text_height = dc.GetTextExtent(action["duration"])
  1281                 dc.DrawText("T#%s"%action["duration"], self.Pos.x + (colsize[0] - text_width) / 2,
  1281                 dc.DrawText(action["duration"], self.Pos.x + (colsize[0] - text_width) / 2,
  1282                     self.Pos.y + i * SFC_ACTION_MIN_SIZE[1] + SFC_ACTION_MIN_SIZE[1] / 2)
  1282                     self.Pos.y + i * SFC_ACTION_MIN_SIZE[1] + SFC_ACTION_MIN_SIZE[1] / 2)
  1283             else:
  1283             else:
  1284                 dc.DrawText(action["qualifier"], self.Pos.x + (colsize[0] - text_width) / 2,
  1284                 dc.DrawText(action["qualifier"], self.Pos.x + (colsize[0] - text_width) / 2,
  1285                         self.Pos.y + i * SFC_ACTION_MIN_SIZE[1] + (SFC_ACTION_MIN_SIZE[1] - text_height) / 2)
  1285                         self.Pos.y + i * SFC_ACTION_MIN_SIZE[1] + (SFC_ACTION_MIN_SIZE[1] - text_height) / 2)
  1286             text_width, text_height = dc.GetTextExtent(action["value"])
  1286             text_width, text_height = dc.GetTextExtent(action["value"])