diff --git a/assets/logo.ico b/assets/logo.ico index 10051d3..7822a10 100644 Binary files a/assets/logo.ico and b/assets/logo.ico differ diff --git a/assets/logo.png b/assets/logo.png index f8652bc..949969d 100644 Binary files a/assets/logo.png and b/assets/logo.png differ diff --git a/ui/app.py b/ui/app.py index 69ae82d..647ab49 100644 --- a/ui/app.py +++ b/ui/app.py @@ -27,23 +27,23 @@ from core.dependencies import get_ytdlp_status, get_ffmpeg_status, get_js_status class LDownloaderApp(tk.Tk): def __init__(self): - super().__init__() - self.title("LDownloader v3.5.0") - self.geometry("980x660") - self.minsize(880, 580) - self.configure(bg=BG) - - # Windows Yüksek DPI ve AppUserModelID yapılandırması + # Windows Yüksek DPI ve Görev Çubuğu (Taskbar) İkon Kimliği — Pencere oluşturulmadan ÖNCE çağrılmalıdır if sys.platform == "win32": try: ctypes.windll.shcore.SetProcessDpiAwareness(1) except Exception: pass try: - ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID("ldownloader.modern.gui.3") + ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID("lildosto.ldownloader.v35.icon") except Exception: pass + super().__init__() + self.title("LDownloader v3.5.0") + self.geometry("980x660") + self.minsize(880, 580) + self.configure(bg=BG) + # Ekranı ortala self.update_idletasks() sw = self.winfo_screenwidth() @@ -80,24 +80,45 @@ class LDownloaderApp(tk.Tk): ico_path = os.path.join(app_dir, "logo.ico") if os.path.isfile(ico_path): try: - self.iconbitmap(ico_path) + self.iconbitmap(default=ico_path) except Exception: - pass + try: + self.iconbitmap(ico_path) + except Exception: + pass self.logo_img = None self.window_icon_img = None + self.window_icon_imgs = [] png_path = os.path.join(app_dir, "assets", "logo.png") if not os.path.isfile(png_path): png_path = os.path.join(app_dir, "logo.png") if os.path.isfile(png_path): try: - raw = tk.PhotoImage(file=png_path) - self.window_icon_img = raw - self.iconphoto(True, raw) - factor = max(1, raw.width() // 24) - self.logo_img = raw.subsample(factor, factor) + from PIL import Image, ImageTk + pil_img = Image.open(png_path).convert("RGBA") + # Kenar boşluğu kalmışsa otomatik kırp + bbox = pil_img.getbbox() + if bbox: + pil_img = pil_img.crop(bbox) + for sz in (256, 64, 48, 32, 16): + self.window_icon_imgs.append( + ImageTk.PhotoImage(pil_img.resize((sz, sz), Image.Resampling.LANCZOS)) + ) + self.window_icon_img = self.window_icon_imgs[0] + self.iconphoto(True, *self.window_icon_imgs) + self.logo_img = ImageTk.PhotoImage( + pil_img.resize((28, 28), Image.Resampling.LANCZOS) + ) except Exception: - pass + try: + raw = tk.PhotoImage(file=png_path) + self.window_icon_img = raw + self.iconphoto(True, raw) + factor = max(1, raw.width() // 28) + self.logo_img = raw.subsample(factor, factor) + except Exception: + pass def _build_layout(self): # ── Birleşik Üst Çubuk (Logo + Sekmeler + Durum) ────────────