aboutdialog.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:HeaTDV4A 作者: HeaTTheatR 项目源码 文件源码
def __init__(self, **kvargs):
        super(AboutDialog, self).__init__(**kvargs)
        if self.flag:
            self.background_box_content = [0.0, 0.0, 0.0, 1.0]

        box_content = self.ids.box_content
        height, avatar_size_hint = (60, (.05, .9)) if not self.flag \
            else (120, (.1, 1))

        self.ids.logo.size_hint = avatar_size_hint
        self.ids.box_logo_and_title.height = height

        # ????????? ??????????.
        for info_string in self.info_program:
            if info_string == "":
                box_content.add_widget(SettingSpacer())
                continue

            info_string = \
                Label(text=info_string, size_hint_y=None,
                      font_size=self.base_font_size, markup=True,
                      on_ref_press=self.events_callback)
            info_string.bind(size=lambda *args: self._update_label_size(args))
            box_content.add_widget(info_string)

        if not self.flag:
            self.body_message = Popup(
                underline_color=self.underline_color, content=self,
                title=self.title_message,
                size_hint=(self.user_size_hint[0], self.user_size_hint[1]),
                pos_hint={"center_x": .5, "center_y": .5},
                background=self.background_image,
                on_dismiss=self.dismiss_callback)
            self.body_message.open()
        else:
            refs = Label(text=self.refs, markup=True, size_hint=(1, .1))
            refs.bind(on_ref_press=self.events_callback)
            self.add_widget(refs)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号