mirror of
https://github.com/hyugogirubato/cbz.git
synced 2026-09-26 13:31:00 +00:00
fix: cbzplayer icon for linux
This commit is contained in:
BIN
Binary file not shown.
|
After Width: | Height: | Size: 53 KiB |
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user