-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathimagenavigation.py
More file actions
19 lines (16 loc) · 1.28 KB
/
imagenavigation.py
File metadata and controls
19 lines (16 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import customtkinter as ctk
from PIL import Image
class ImageNavigation(ctk.CTkFrame):
def __init__(self, root, *args, **kwargs):
super().__init__(*args, **kwargs)
self.grid_columnconfigure((0, 1, 2), weight=1)
self.left_arrow_image = ctk.CTkImage(light_image=Image.open(
"./assets/icons8-less-than-48.png"), dark_image=Image.open("./assets/icons8-less-than-dark-mode-48.png"), size=(30, 30))
self.left_arrow_button = ctk.CTkButton(self, corner_radius=0, width=30, height=30, border_spacing=10, text=None,
fg_color="transparent", image=self.left_arrow_image, anchor="w", command=lambda: root.arrow_click("L"))
self.left_arrow_button.grid(row=0, column=0, padx=20)
self.right_arrow_image = ctk.CTkImage(light_image=Image.open(
"./assets/icons8-more-than-48.png"), dark_image=Image.open("./assets/icons8-more-than-dark-mode-48.png"), size=(30, 30))
self.right_arrow_button = ctk.CTkButton(self, corner_radius=0, width=30, height=30, border_spacing=10, text=None,
fg_color="transparent", image=self.right_arrow_image, anchor="w", command=lambda: root.arrow_click("R"))
self.right_arrow_button.grid(row=0, column=2, padx=20)