Exemplo n.º 1
0
            def pack_sub_foot_win():
                def settings():
                    GuiSettings.pack()

                def click_login():
                    def async_login(args=None):
                        self.login_handle()
                        try:
                            login_btn.disable(False)
                        except:
                            pass

                    login_btn.disable(True)
                    Common.create_thread(func=async_login)

                # 选项按钮
                set_byn = tk.Button(foot_fm,
                                    text='☰',
                                    font=(Global.G_DEFAULT_FONT, 18),
                                    bd=0,
                                    activebackground=Global.G_DEFAULT_COLOR,
                                    bg=Global.G_DEFAULT_COLOR,
                                    command=settings)
                set_byn.pack(side='left', padx=50)
                WidgetTip.enter_tips(set_byn, '首选项', 10, 15)
                # 一键登录按钮
                login_btn = ColorButton(foot_fm,
                                        size=14,
                                        width=26,
                                        text='一  键  登  录',
                                        command=click_login)
Exemplo n.º 2
0
 def pack_sub_btn_fm():
     btn_style = {
         'master': sub_btn_fm,
         'font': (Global.G_DEFAULT_FONT, 10),
         'bd': 0
     }
     add_btn = tk.Button(text='✚',
                         command=add_sublogin,
                         **btn_style)
     add_btn.pack(side='left', padx=20)
     eye_btn = tk.Button(text='�', **btn_style)
     eye_btn.pack(side='right', padx=20)
     eye_btn.bind("<Button-1>",
                  lambda event, t=True: see_password(t))
     eye_btn.bind("<ButtonRelease-1>",
                  lambda event, t=False: see_password(t))
     WidgetTip.enter_tips(add_btn, '增加一个登录栏', 10, 15)
     WidgetTip.enter_tips(eye_btn, '显示明文密码', 10, 15)