Merge pull request 'improved code and folder structure' (#22) from improved_code into main
Reviewed-on: Fabelous/MPENN#22
This commit is contained in:
commit
e48ae11d70
|
@ -1,11 +1,16 @@
|
|||
# this is a modified version of the CTkColorPicker from GitHub
|
||||
"""Fabelous CTK Color Picker for customtkinter
|
||||
----------------------------------------
|
||||
Based on the original work by Akash Bora (Akascape)
|
||||
Contributions from Victor Vimbert-Guerlais (helloHackYnow)
|
||||
Original: https://github.com/Akascape/CTkColorPicker/tree/main
|
||||
"""
|
||||
|
||||
|
||||
import customtkinter as Ctk
|
||||
from PIL import Image, ImageTk
|
||||
import os
|
||||
import math
|
||||
|
||||
PATH = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
class AskColor(Ctk.CTkToplevel):
|
||||
|
||||
|
@ -52,9 +57,8 @@ class AskColor(Ctk.CTkToplevel):
|
|||
|
||||
self.canvas.bind("<B1-Motion>", self.on_mouse_drag)
|
||||
|
||||
self.img1 = Image.open(os.path.join(PATH, 'color_wheel.png')).resize((self.image_dimension, self.image_dimension), Image.Resampling.LANCZOS)
|
||||
self.img2 = Image.open(os.path.join(PATH, 'target.png')).resize((self.target_dimension, self.target_dimension), Image.Resampling.LANCZOS)
|
||||
|
||||
self.img1 = Image.open('icons/color_wheel.png').resize((self.image_dimension, self.image_dimension), Image.Resampling.LANCZOS)
|
||||
self.img2 = Image.open('icons/target.png').resize((self.target_dimension, self.target_dimension), Image.Resampling.LANCZOS)
|
||||
self.wheel = ImageTk.PhotoImage(self.img1)
|
||||
self.target = ImageTk.PhotoImage(self.img2)
|
||||
|
||||
|
|
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 109 KiB |
Before Width: | Height: | Size: 933 B After Width: | Height: | Size: 933 B |
Loading…
Reference in New Issue