diff --git a/assets/icon.ico b/assets/icon.ico new file mode 100644 index 0000000..ff8b4e7 Binary files /dev/null and b/assets/icon.ico differ diff --git a/assets/icons/add.png b/assets/icons/add.png new file mode 100644 index 0000000..5f2a68a Binary files /dev/null and b/assets/icons/add.png differ diff --git a/assets/icons/folder.png b/assets/icons/folder.png new file mode 100644 index 0000000..2534255 Binary files /dev/null and b/assets/icons/folder.png differ diff --git a/assets/logo.png b/assets/logo.png new file mode 100644 index 0000000..0f22c66 Binary files /dev/null and b/assets/logo.png differ diff --git a/citorrent.spec b/citorrent.spec index 456b90a..ecbe13d 100644 --- a/citorrent.spec +++ b/citorrent.spec @@ -26,7 +26,7 @@ exe = EXE( a.zipfiles, a.datas, [], - name='Citorrent', + name='Citorrent',\n icon='assets/icon.ico', debug=False, bootloader_ignore_signals=False, strip=False, diff --git a/create_placeholders.py b/create_placeholders.py new file mode 100644 index 0000000..80a51ad --- /dev/null +++ b/create_placeholders.py @@ -0,0 +1,30 @@ +import os +from PIL import Image, ImageDraw + +def create_image(path, color, content, size=(64, 64)): + img = Image.new('RGBA', size, (0, 0, 0, 0)) + draw = ImageDraw.Draw(img) + if content == 'logo': + margin = 10 + draw.rounded_rectangle([margin, margin, size[0]-margin, size[1]-margin], radius=15, fill=color) + elif content == 'add': + r = size[0] // 3 + center = (size[0]//2, size[1]//2) + draw.ellipse([center[0]-r, center[1]-r, center[0]+r, center[1]+r], fill=color) + thickness = 4 + half_len = r // 2 + draw.line([center[0], center[1]-half_len, center[0], center[1]+half_len], fill='white', width=thickness) + draw.line([center[0]-half_len, center[1], center[0]+half_len, center[1]], fill='white', width=thickness) + elif content == 'folder': + w, h = size[0]-20, size[1]-20 + x, y = 10, 15 + draw.rectangle([x, y+10, x+w, y+h], fill=color) + draw.rectangle([x, y, x+w//3, y+10], fill=color) + os.makedirs(os.path.dirname(path), exist_ok=True) + img.save(path) + +if __name__ == "__main__": + blue = (30, 144, 255, 255) + create_image("assets/logo.png", blue, 'logo', size=(512, 512)) + create_image("assets/icons/add.png", blue, 'add') + create_image("assets/icons/folder.png", blue, 'folder') diff --git a/make_icon.py b/make_icon.py new file mode 100644 index 0000000..ab88c2c --- /dev/null +++ b/make_icon.py @@ -0,0 +1,13 @@ +import os +from PIL import Image + +def convert_png_to_ico(png_path, ico_path): + try: + img = Image.open(png_path) + icon_sizes = [(16, 16), (32, 32), (48, 48), (64, 64), (128, 128), (256, 256)] + img.save(ico_path, format='ICO', sizes=icon_sizes) + except Exception as e: + print(f"Error: {e}") + +if __name__ == "__main__": + convert_png_to_ico("assets/logo.png", "assets/icon.ico")