|
1 | 1 | from customtkinter import CTkFrame, CTkLabel, CTkImage, CTkButton, CTkOptionMenu |
2 | 2 | from PIL import Image |
3 | | -from config.application_configuration import FONT_PATH |
4 | 3 | from config.application_configuration import RELOAD_ICON |
5 | 4 |
|
6 | 5 |
|
7 | 6 | class FrameSearchDevice(CTkFrame): |
| 7 | + """ |
| 8 | + A specialized class designed to facilitate search device operations. |
| 9 | + """ |
8 | 10 |
|
9 | 11 | def __init__(self, master, *args, **kwargs): |
10 | 12 | """ |
11 | 13 | A custom frame designed with widgets for select a device. This frame |
12 | | - is a child of the specified parent widget (master) and includes an Label, |
| 14 | + is a child of the specified parent widget (master) and includes a Label, |
13 | 15 | Image, Button and an OptionMenu with customizable UI features. |
14 | 16 | """ |
15 | 17 | super().__init__(master, *args, **kwargs) |
16 | 18 |
|
17 | 19 | self.grid(row=0, column=0, columnspan=2, pady=10, padx=10, sticky="ew") |
18 | 20 |
|
19 | | - self.device_path_label = CTkLabel(self, text='Device Path:') |
20 | | - self.device_path_label.pack(side="left", padx=10, pady=10) |
21 | | - self.device_path_label.configure(font=FONT_PATH) |
| 21 | + self.label = CTkLabel(self, text='Device Path:') |
| 22 | + self.label.pack(side="left", padx=10, pady=10) |
22 | 23 |
|
23 | 24 | reload_img = CTkImage(light_image=Image.open(RELOAD_ICON)) |
24 | 25 |
|
25 | | - self.refresh = CTkButton(self, image=reload_img, text='', width=30) |
26 | | - self.refresh.pack(side="right", padx=10, pady=10) |
| 26 | + self.reload_btn = CTkButton(self, image=reload_img, text='', width=30) |
| 27 | + self.reload_btn.pack(side="right", padx=10, pady=10) |
27 | 28 |
|
28 | 29 | self.device_option = CTkOptionMenu(self, width=150) |
29 | 30 | self.device_option.pack(side="right", padx=10, pady=10) |
0 commit comments