fix: cbzplayer icon for linux

This commit is contained in:
flolep2607
2024-07-14 20:26:05 +02:00
parent bf735138b3
commit 90abd137c5
2 changed files with 8 additions and 2 deletions
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

+6
View File
@@ -10,6 +10,7 @@ from pathlib import Path
from cbz.comic import ComicInfo from cbz.comic import ComicInfo
from cbz.page import PageInfo from cbz.page import PageInfo
from cbz.utils import readable_size from cbz.utils import readable_size
import os
class Player: class Player:
@@ -52,8 +53,13 @@ class Player:
# Set initial window size # Set initial window size
self.root.geometry(self._get_initial_geometry()) self.root.geometry(self._get_initial_geometry())
# Check if windows or linux
if os.name == 'nt':
# Set window icon # Set window icon
self.root.iconbitmap(Path(__file__).parent / 'cbz.ico') self.root.iconbitmap(Path(__file__).parent / 'cbz.ico')
else:
# Set window icon
self.root.wm_iconphoto(True, tk.PhotoImage(file=Path(__file__).parent / 'cbz.png'))
# Create main frame for content # Create main frame for content
self.main_frame = ttk.Frame(self.root) self.main_frame = ttk.Frame(self.root)