diff --git a/assets/icon.png b/assets/icon.png deleted file mode 100644 index 1061656..0000000 Binary files a/assets/icon.png and /dev/null differ diff --git a/assets/logo.png b/assets/logo.png index dae1042..7471946 100644 Binary files a/assets/logo.png and b/assets/logo.png differ diff --git a/assets/pattern.png b/assets/pattern.png deleted file mode 100644 index 715c2bd..0000000 Binary files a/assets/pattern.png and /dev/null differ diff --git a/src/gui_main.py b/src/gui_main.py index de0166c..8a46a75 100644 --- a/src/gui_main.py +++ b/src/gui_main.py @@ -174,7 +174,7 @@ def run_installer(download_folder_tmp): # Create a container frame for widgets container = CTkFrame(app) - container.pack(side="right") # Place the container on the right side + container.pack(ipadx="100") # Place the container on the right side # Display the StarField initially display_star_field(container) diff --git a/src/star_field.py b/src/star_field.py index ec90b4e..230aa7e 100644 --- a/src/star_field.py +++ b/src/star_field.py @@ -1,6 +1,7 @@ import math from tkinter import Canvas -from random import randrange # Add this import statement +from random import randrange +from PIL import Image, ImageTk # Import Image and ImageTk from PIL class Star: __slots__ = ['x', 'y', 'z', 'id', 'radius', 'fill'] @@ -25,10 +26,19 @@ class StarField: self.max_depth = depth self.center_x = width / 2 self.center_y = height / 2 - self.circular_mask_radius = min(self.center_x, self.center_y) + self.circular_mask_radius = min(self.center_x, self.center_y) *0.95 self.canvas = Canvas(master, width=width, height=height, bg="#000000") self.canvas.pack() + # Load the image and resize it + original_image = Image.open("./assets/logo.png") # Specify the path to your image + image_size = self.height if self.width > self.height else self.width + resized_image = original_image.resize((image_size, image_size), resample=Image.LANCZOS) + + + self.image = ImageTk.PhotoImage(resized_image) + self.image_item = self.canvas.create_image(self.center_x, self.center_y, anchor='center', image=self.image) + for x in range(num_stars): star = Star(x=randrange(-self.width, self.width), y=randrange(-self.height, self.height), @@ -65,4 +75,7 @@ class StarField: self.canvas.coords(star.id, x - star.radius, y - star.radius, x + star.radius, y + star.radius) self.canvas.itemconfig(star.id, fill='#%02x%02x%02x' % (star.fill, star.fill, star.fill)) - self.canvas.after(30, self.draw) + # Move the image to the front + self.canvas.tag_raise(self.image_item) + + self.canvas.after(30, self.draw) \ No newline at end of file