def _update_canvas_size(self, instance, value):
"""?????????? ??? ????????? ??????? ?????? ??????????.
type instance: instance <kivy.uix.gridlayout.GridLayout object'>;
type value: list;
param value: ??????? ?????? instance;
"""
self.canvas_for_box_content.pos = instance.pos
self.canvas_for_box_content.size = instance.size
# ????????? ??????? ???? Popup - ???? ?????????.
if self.param in ["text", "tel", "address", "mail", "password",
"datetime", "number"]:
plus_height = 170
elif self.param == "logpass":
plus_height = 200
else:
plus_height = 120
self.body.height = self.canvas_for_box_content.size[1] + plus_height
self.body.width = int(Window.size[0] / self.size_hint_x)
if self.body.height > Window.size[1]:
self.body.height = Window.size[1] - 10
if self.rst:
self.message.height = self.body.height / 1.33
评论列表
文章目录