レイアウトを修正、文言の編集、guitestモード追加
This commit is contained in:
parent
d1cf551fd3
commit
b6bbefbcbe
1 changed files with 30 additions and 18 deletions
|
@ -267,11 +267,14 @@ class Lock(customtkinter.CTkToplevel):
|
||||||
|
|
||||||
self.cover_img = customtkinter.CTkImage(light_image=Image.open(resource_path + '\\cover\\dislocker_light.png'), dark_image=Image.open(resource_path + '\\cover\\dislocker_dark.png'), size=(160, 320))
|
self.cover_img = customtkinter.CTkImage(light_image=Image.open(resource_path + '\\cover\\dislocker_light.png'), dark_image=Image.open(resource_path + '\\cover\\dislocker_dark.png'), size=(160, 320))
|
||||||
|
|
||||||
|
self.grid_columnconfigure(0, weight=1)
|
||||||
|
self.grid_columnconfigure(1, weight=6)
|
||||||
|
|
||||||
self.cover_frame = customtkinter.CTkFrame(self, corner_radius=0, fg_color='transparent')
|
self.cover_frame = customtkinter.CTkFrame(self, corner_radius=0, fg_color='transparent')
|
||||||
self.cover_frame.grid(row=0, column=0, padx=0, pady=0)
|
self.cover_frame.grid(row=0, column=0, padx=0, pady=0, sticky="nsew", rowspan=4)
|
||||||
|
|
||||||
self.cover_img_label = customtkinter.CTkLabel(self.cover_frame, image=self.cover_img, text="")
|
self.cover_img_label = customtkinter.CTkLabel(self.cover_frame, image=self.cover_img, text="")
|
||||||
self.cover_img_label.grid(row=0, column=0, padx=0, pady=0)
|
self.cover_img_label.grid(row=0, column=0, padx=0, pady=0, sticky="w")
|
||||||
|
|
||||||
self.msg_title_frame = customtkinter.CTkFrame(self, corner_radius=0, fg_color='transparent')
|
self.msg_title_frame = customtkinter.CTkFrame(self, corner_radius=0, fg_color='transparent')
|
||||||
self.msg_title_frame.grid(row=0, column=1, padx=10, pady=10, sticky="nsew")
|
self.msg_title_frame.grid(row=0, column=1, padx=10, pady=10, sticky="nsew")
|
||||||
|
@ -279,24 +282,27 @@ class Lock(customtkinter.CTkToplevel):
|
||||||
#self.icon_title_1 = customtkinter.CTkLabel(self.msg_title_frame, text='😎', font=self.emoji_font, justify="left")
|
#self.icon_title_1 = customtkinter.CTkLabel(self.msg_title_frame, text='😎', font=self.emoji_font, justify="left")
|
||||||
#self.icon_title_1.grid(row=0, column=0, padx=10, sticky="w")
|
#self.icon_title_1.grid(row=0, column=0, padx=10, sticky="w")
|
||||||
|
|
||||||
self.msg_title_1 = customtkinter.CTkLabel(self.msg_title_frame, text=f'ちょっと待って!! PC番号 | {client_config["pc_number"]}', font=self.title_font, justify="left")
|
self.msg_title_1 = customtkinter.CTkLabel(self.msg_title_frame, text=f'ちょっと待って!! ', font=self.title_font, justify="left")
|
||||||
self.msg_title_1.grid(row=0, column=1, padx=10, sticky="w")
|
self.msg_title_1.grid(row=0, column=0, padx=10, sticky="we")
|
||||||
|
|
||||||
|
self.pc_number_title_1 = customtkinter.CTkLabel(self.msg_title_frame, text=f'PC番号 | {client_config["pc_number"]}', font=self.title_font, justify="right")
|
||||||
|
self.pc_number_title_1.grid(row=0, column=1, padx=10, sticky="e")
|
||||||
|
|
||||||
self.msg_title_2 = customtkinter.CTkLabel(self.msg_title_frame, text="本当にあなたですか?", font=self.title_small_font, justify="left")
|
self.msg_title_2 = customtkinter.CTkLabel(self.msg_title_frame, text="本当にあなたですか?", font=self.title_small_font, justify="left")
|
||||||
self.msg_title_2.grid(row=1, column=1, padx=10, sticky="w")
|
self.msg_title_2.grid(row=1, column=0, padx=10, columnspan=2, sticky="w")
|
||||||
|
|
||||||
self.msg_subtitle_frame = customtkinter.CTkFrame(self, corner_radius=0, fg_color='transparent')
|
self.msg_subtitle_frame = customtkinter.CTkFrame(self, corner_radius=0, fg_color='transparent')
|
||||||
self.msg_subtitle_frame.grid(row=1, column=0, padx=10, pady=10, sticky="nsew")
|
self.msg_subtitle_frame.grid(row=1, column=1, padx=10, pady=0, sticky="nsew")
|
||||||
self.msg_subtitle_frame.grid_columnconfigure(0, weight=1)
|
self.msg_subtitle_frame.grid_columnconfigure(0, weight=1)
|
||||||
|
|
||||||
self.msg_subtitle_1 = customtkinter.CTkLabel(self.msg_subtitle_frame, text='サインインするには、Discordのダイレクトメッセージに送信された\nパスワードを入力してください。', font=self.general_font, justify="left")
|
self.msg_subtitle_1 = customtkinter.CTkLabel(self.msg_subtitle_frame, text='サインインするには、Discordを開き、Dislockerから送信された\nパスワードを入力してください。', font=self.general_font, justify="left")
|
||||||
self.msg_subtitle_1.grid(row=0, column=0, padx=10, sticky="ew")
|
self.msg_subtitle_1.grid(row=0, column=0, padx=10, sticky="w")
|
||||||
|
|
||||||
self.msg_subtitle_2 = customtkinter.CTkLabel(self.msg_subtitle_frame, text='※ パスワードの有効期限は発行から5分間です。', font=self.general_small_font, justify="left")
|
self.msg_subtitle_2 = customtkinter.CTkLabel(self.msg_subtitle_frame, text='※ パスワードの有効期限は発行から5分間です。期限が切れた場合は、もう一度発行してください。', font=self.general_small_font, justify="left")
|
||||||
self.msg_subtitle_2.grid(row=1, column=0, padx=10, sticky="w")
|
self.msg_subtitle_2.grid(row=1, column=0, padx=10, sticky="w")
|
||||||
|
|
||||||
self.input_frame = customtkinter.CTkFrame(self, corner_radius=0, fg_color='transparent')
|
self.input_frame = customtkinter.CTkFrame(self, corner_radius=0, fg_color='transparent')
|
||||||
self.input_frame.grid(row=2, column=0, padx=10, pady=10, sticky="nsew")
|
self.input_frame.grid(row=2, column=1, padx=10, pady=0, sticky="nsew")
|
||||||
self.input_frame.columnconfigure(0, weight=1)
|
self.input_frame.columnconfigure(0, weight=1)
|
||||||
|
|
||||||
self.password_entry = customtkinter.CTkEntry(self.input_frame, placeholder_text='パスワード', show='*', font=self.textbox_font)
|
self.password_entry = customtkinter.CTkEntry(self.input_frame, placeholder_text='パスワード', show='*', font=self.textbox_font)
|
||||||
|
@ -304,7 +310,7 @@ class Lock(customtkinter.CTkToplevel):
|
||||||
self.password_entry.bind("<Return>", self.auth_start_ev)
|
self.password_entry.bind("<Return>", self.auth_start_ev)
|
||||||
|
|
||||||
self.button_frame = customtkinter.CTkFrame(self, corner_radius=0, fg_color='transparent')
|
self.button_frame = customtkinter.CTkFrame(self, corner_radius=0, fg_color='transparent')
|
||||||
self.button_frame.grid(row=3, column=0, padx=10, pady=10, sticky="nsew")
|
self.button_frame.grid(row=3, column=1, padx=10, pady=10, sticky="nsew")
|
||||||
self.button_frame.columnconfigure(0, weight=3)
|
self.button_frame.columnconfigure(0, weight=3)
|
||||||
self.button_frame.columnconfigure(1, weight=1)
|
self.button_frame.columnconfigure(1, weight=1)
|
||||||
self.button_frame.columnconfigure(2, weight=1)
|
self.button_frame.columnconfigure(2, weight=1)
|
||||||
|
@ -630,6 +636,12 @@ if __name__ == '__main__':
|
||||||
else:
|
else:
|
||||||
print("エラーが発生しました。")
|
print("エラーが発生しました。")
|
||||||
|
|
||||||
|
elif args[1] == "guitest":
|
||||||
|
init_result = init()
|
||||||
|
client_config["testing"] = True
|
||||||
|
app = App()
|
||||||
|
app.mainloop()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print("引数エラー。")
|
print("引数エラー。")
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue