def refresh_widths(self):
i = self.ids
i.bg._label.refresh() # have to refresh to update texture size
i.carbs._label.refresh()
i.bolus._label.refresh()
i.notes._label.refresh()
i.layout.width = sum(x.width for x in self.ids.layout.children)
totalwidth = i.layout.width + i.time.width
print totalwidth
if totalwidth < (Window.width + i.deletebtn.width + i.editbtn.width):
i.spacer.width = Window.width - totalwidth + i.deletebtn.width + i.editbtn.width
self.refresh_widths()
评论列表
文章目录