Merge pull request #9 from flolep2607/fix-linux-player

fix: cbzplayer icon  for linux
This commit is contained in:
hyugogirubato
2024-07-15 18:55:00 +02:00
committed by GitHub
2 changed files with 8 additions and 2 deletions
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

+8 -2
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())
# Set window icon # Check if windows or linux
self.root.iconbitmap(Path(__file__).parent / 'cbz.ico') if os.name == 'nt':
# Set window icon
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)