Spaces:
Running
Running
Commit History
-
π³ 27/08 - 12:50 - a warning "overflow" is displayed if an item is added which exceeds the remaining available space, can we change that to a pop warning that is displayed? or something that is more o
Verified signaturef02e764
-
give it a modern look with glass effect and transparency, rename "Space GRid wizard" to "Load allocator" and change logo at the top to the uploaded file
Verified signaturee534b1a -
# space_allocator_final.pyβ
Verified signatureimport tkinter as tk from tkinter import ttk, messagebox from PIL import Image, ImageTk import customtkinter as ctk import sys, os # ---------- Configuration ---------- DEFAULT_W = 600 DEFAULT_H = 250 WINDOW_W = 1200 WINDOW_H = 700 CANVAS_BG = "#0f1115" GLASS_BG = "#1b1d22" ACCENT = "#3b82f6" ANIMATION_FRAMES = 20 # ~0.4s # ---------- Helper function for PyInstaller ---------- def resource_path(relative_path): try: base_path = sys._MEIPASS except Exception: base_path = os.path.abspath(".") return os.path.join(base_path, relative_path) # ---------- Data ---------- class Item: def __init__(self, name, length, width): self.name = name self.length = float(length) self.width = float(width) self.area = self.length * self.width self.curr_x = 0 self.curr_y = 0 self.tag = name # ---------- Grid-based packing ---------- def grid_pack(items, container_w, container_h, cell_size=5): cols = max(1, int(β¦1dd531b -
initial commit
Verified signature273248e