カバー画像の追加

This commit is contained in:
suti7yk5032 2024-10-01 15:32:33 +09:00
parent 5de0d66829
commit d88a40a360

View file

@ -17,6 +17,7 @@ import uuid
import time
import win32com.client
import pythoncom
from PIL import Image
app_name = "Dislocker"
dislocker_dir = os.path.dirname(os.path.abspath(sys.argv[0]))
@ -242,7 +243,7 @@ class Lock(customtkinter.CTkToplevel):
self.title(f'{app_name} | PC番号 {client_config["pc_number"]} | ロックされています')
self.iconbitmap(default=resource_path + '\\icon\\dislocker.ico')
self.window_width = 600
self.window_width = 760
self.window_height = 320
self.screen_width = self.winfo_screenwidth()
self.screen_height = self.winfo_screenheight()
@ -264,12 +265,19 @@ class Lock(customtkinter.CTkToplevel):
self.textbox_font = customtkinter.CTkFont(family="meiryo", size=14)
self.button_font = customtkinter.CTkFont(family="meiryo", size=14)
self.cover_img = customtkinter.CTkImage(light_image=Image.open(resource_path + '\\dislocker_light.png'), dark_image=Image.open(resource_path + '\\dislocker_dark.png'), size=(160, 320))
self.cover_frame = customtkinter.CTkFrame(self, corner_radius=0, fg_color='transparent')
self.cover_frame.grid(row=0, column=0, padx=10, pady=10, sticky="nsew")
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.msg_title_frame = customtkinter.CTkFrame(self, corner_radius=0, fg_color='transparent')
self.msg_title_frame.grid(row=0, column=0, padx=10, pady=10, sticky="nsew")
self.msg_title_frame.grid(row=1, column=0, padx=10, pady=10, sticky="nsew")
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 = 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.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.grid(row=0, column=1, padx=10, sticky="w")