Skip to content

Commit a373bdb

Browse files
feat(cli): add app icon (#64)
* feat: add icon * feat: add app icon * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix(lint): ignore resources file with mypy Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent e3e7961 commit a373bdb

File tree

6 files changed

+185
-3
lines changed

6 files changed

+185
-3
lines changed

manim-slides.qrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!DOCTYPE RCC>
2+
<RCC version="1.0">
3+
<qresource>
4+
<file alias="icon.png">static/icon.png</file>
5+
</qresource>
6+
</RCC>

manim_slides/present.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@
1111
from pydantic import ValidationError
1212
from PySide6 import QtGui
1313
from PySide6.QtCore import Qt, QThread, Signal, Slot
14-
from PySide6.QtGui import QPixmap
14+
from PySide6.QtGui import QIcon, QPixmap
1515
from PySide6.QtWidgets import QApplication, QGridLayout, QLabel, QWidget
1616
from tqdm import tqdm
1717

1818
from .commons import config_path_option, verbosity_option
1919
from .config import DEFAULT_CONFIG, Config, PresentationConfig, SlideConfig, SlideType
2020
from .defaults import FOLDER_PATH
2121
from .manim import logger
22+
from .resources import * # noqa: F401, F403
2223

2324
os.environ.pop(
2425
"QT_QPA_PLATFORM_PLUGIN_PATH", None
@@ -534,6 +535,8 @@ def __init__(
534535
super().__init__()
535536

536537
self.setWindowTitle(WINDOW_NAME)
538+
self.icon = QIcon(":/icon.png")
539+
self.setWindowIcon(self.icon)
537540
self.display_width, self.display_height = resolution
538541
self.aspect_ratio = aspect_ratio
539542
self.resize_mode = resize_mode

manim_slides/resources.py

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
# type: ignore
2+
# Resource object code (Python 3)
3+
# Created by: object code
4+
# Created by: The Resource Compiler for Qt version 6.4.0
5+
# WARNING! All changes made in this file will be lost!
6+
7+
from PySide6 import QtCore
8+
9+
qt_resource_data = b"\
10+
\x00\x00\x08\x1c\
11+
\x89\
12+
PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\
13+
\x00\x01\x00\x00\x00\x01\x00\x08\x06\x00\x00\x00\x5cr\xa8f\
14+
\x00\x00\x01\x84iCCPICC prof\
15+
ile\x00\x00(\x91}\x91=H\xc3@\x1c\xc5_\
16+
S\xa5R+\x0e\xed \xe2\x90\xa1:Y\x10-\xe2\xa8\
17+
U(B\x85P+\xb4\xea`r\xfd\x84&\x0dI\x8a\
18+
\x8b\xa3\xe0Zp\xf0c\xb1\xea\xe0\xe2\xac\xab\x83\xab \
19+
\x08~\x808:9)\xbaH\x89\xffK\x0a-b<\
20+
8\xee\xc7\xbb{\x8f\xbbw\x80\xd0\xac2\xd5\xec\x99\x00\
21+
T\xcd2\xd2\xc9\x84\x98\xcd\xad\x8a\x81W\x04\x11F?\
22+
\xe2\x88\xcb\xcc\xd4\xe7$)\x05\xcf\xf1u\x0f\x1f_\xef\
23+
b<\xcb\xfb\xdc\x9fc _0\x19\xe0\x13\x89g\x99\
24+
nX\xc4\x1b\xc4\xd3\x9b\x96\xcey\x9f8\xc2\xcar\x9e\
25+
\xf8\x9cx\xdc\xa0\x0b\x12?r]q\xf9\x8ds\xc9a\
26+
\x81gF\x8cLz\x9e8B,\x96\xbaX\xe9bV\
27+
6T\xe28q4\xafj\x94/d]\xces\xde\xe2\
28+
\xacV\xeb\xac}O\xfe\xc2PA[Y\xe6:\xcd\x11\
29+
$\xb1\x88%H\x10\xa1\xa0\x8e\x0a\xaa\xb0\x10\xa3U#\
30+
\xc5D\x9a\xf6\x13\x1e\xfea\xc7/\x91K!W\x05\x8c\
31+
\x1c\x0b\xa8A\x85\xec\xf8\xc1\xff\xe0w\xb7fqj\xd2\
32+
M\x0a%\x80\xde\x17\xdb\xfe\x18\x05\x02\xbb@\xaba\xdb\
33+
\xdf\xc7\xb6\xdd:\x01\xfc\xcf\xc0\x95\xd6\xf1\xd7\x9a\xc0\xcc\
34+
'\xe9\x8d\x8e\x16=\x02\x06\xb7\x81\x8b\xeb\x8e\xa6\xec\x01\
35+
\x97;\xc0\xd0\x93.\x1b\xb2#\xf9i\x0a\xc5\x22\xf0~\
36+
F\xdf\x94\x03\xc2\xb7@p\xcd\xed\xad\xbd\x8f\xd3\x07 \
37+
C]\xa5n\x80\x83C`\xacD\xd9\xeb\x1e\xef\xee\xeb\
38+
\xee\xed\xdf3\xed\xfe~\x00\xd6\xd3r\xcf+\xa2\xc1_\
39+
\x00\x00\x00\x06bKGD\x004\x004\x004\xaf4\
40+
\x1c\xc0\x00\x00\x00\x09pHYs\x00\x00.#\x00\x00\
41+
.#\x01x\xa5?v\x00\x00\x00\x07tIME\x07\
42+
\xe6\x0a\x13\x0c\x0f\x03\x13^\x06\xfe\x00\x00\x00\x19tE\
43+
XtComment\x00Create\
44+
d with GIMPW\x81\x0e\x17\x00\
45+
\x00\x05\xf4IDATx\xda\xed\xddA\x92\x9b:\x18\
46+
\x85QK\xe5%\xc1\xfe\x17\x00{rF\x19\xa4\xcb\xee\
47+
\x801X\xd2=g\x98z\x956 }\xfe\xd5\xddy\
48+
\xbe\xdd\x00\x00\x00\x00\x00\x801\x95\xab\xbe\xd04M\x0f\
49+
\xb7\x1b\xb6[\xd7\xb5t\x1d\x00\x9b\x1e\xda\x8eA\xb1\xf1\
50+
!7\x04\xc5\xc6\x87\xdc\x10\x14\x1b\x1fr#Pl~\
51+
\xc8\x0dA\xb1\xf9!7\x02\xc5\xe6\x87\xdc\x08\x14\x9b\x1f\
52+
r#Pl~\xc8\x8d@\xb1\xf9!7\x02\xc5\xe6\x87\
53+
\xdc\x08T\x9b\x1frU\xb7\x00\xc6\xb4\xe5\x8d\xbb|\xe2\
54+
/\x01\xfa<\x0aT\x9b\x1f\x1c\x01\x80\xc0\xa3@\xf5\xee\
55+
\x0f&\x00 p\x0a\xa8\xde\xfd\xc1\x04\x00\x04N\x01\x02\
56+
\x00&\x00@\x00\x9c\xff!\xca\xbd\x85\x17\xb1,\x8b'\
57+
A\x9cy\x9e\xb3\x03`\xe3\x93\xec\xef\xfa\xfff\x08\xaa\
58+
\xcd\x0f\xb9\x13p\xb5\xf9!7\x02~\x0a\x00\xc1.\x0f\
59+
\x80w\x7fhgo\x98\x00\xc0\x04\x00\x08\x00 \x00\x80\
60+
\x00\x00\x02\x00\x08\x00 \x00\x80\x00\x00\x02\x00\x08\x00 \
61+
\x00\x80\x00\x00\x02\x00\x08\x00 \x00\x80\x00\x00\x02\x00\x08\
62+
\x00 \x00\x80\x00\x00\x02\x00\x08\x00 \x00\x80\x00\x00\x02\
63+
\x00|\xd2\xbd\xb7\x17\xfc\xdbG)\x8f\xfc\xb1c-^\
64+
\xb7g\xd1\xffu\x97\x9f\x7f0M\xd3\xe3\xcc/x\xe4\
65+
\x06m\xfd\x1c\xf5\x91\x16_\x8b\xd7\xbc\xe7\xf3\xec\x13\x9f\
66+
\xc5\x91\xeb\xde\xf35\xde\xb1\xaek\xe9\xf2\x08\xb0\xe7\xc6\
67+
\x9c}\x13\x93\xafy\xef\xd7I|\x16=]w\x1d\xf1\
68+
\xe6\x8f\xb0\xf0Z\xbc\xe6w\xff\xfe\xc4g\xd1\x8b\xea\xe6\
69+
\xb7w\xbdG\xae\xb9\xd5\xfb\x95\xf6\x1c{\xb9\xe6\xea\x01\
70+
x\xbd\xae/\xf7\x99\xf81\xa0\x85v\xe9\xeb;:\xe1\
71+
\x006\xbfkF\x00l\x04\xd7\x8e\x00t\xbc\xf8m\
72+
\x00\x11\x10\x00\x8b\xde\xfd\x10C\x01\xb0\xf9qo\x04\xc0\
73+
\x02w\x8f\xdc\x04\x01\xb0\xb0\xdd+\x04\xc0\xf9V\x04\x10\
74+
\x00\x8bX<\x11\x00\x9b\xdf\xbdD\x00,X\xf7\x14\x01\
75+
\xb0P\xdd[\x04\xc0yU\x04\x10\x00\x8bRl\x11\x00\
76+
\x9b\xdf\xbdG\x00,@\xcf\x00\x01\xb0\xf0<\x0b\x04\xc0\
77+
\xf9S\x04\x10\x00\x8b\xcc\xf3A\x00,.\x13\x1a\x02`\
78+
\xf3{f\x08\x80\x85\xe4\xd9\x09\x00FI\x11\x10\x00,\
79+
\x1a1\x17\x00\x8b\x05\xcfV\x00,\x10<c\x01\xb00\
80+
\xf0\xac\x05\xc0\xf9\x10\x11\x10\x00\x8b\x00\xf1\x17\x00\x9b\x1f\
81+
kA\x00<p\xac\x09\x01\xf0\xa0\xb16\x04\xc0y\x0f\
82+
\x11\x10\x00\x0f\x15\xeb\xa5\x1bw\x0f\x13r\xd7\x8d_\x04\
83+
\x82`\x02\x00\x02\x00\x08\x00 \x00\x80\x00\x00\x02\x00\x08\
84+
\x00 \x00\x80\x00\x00\x02\xd0\xbeeY<e\xac\x9d\xe4\
85+
\x09@\x04\xb0f\xc2\x8f\x00\xcb\xb2\x08\x016\x7f\xfa\xf7\
86+
\x00D\x00o\x12\xc1\x01\x10\x01\xac\x89\xf0\x00\x88\x00\xd6\
87+
Bx\x00D\x00k\xc0\xef\x01\xf8\xe6\xa0\xcd/\x00X\
88+
\x0c\x9e\xb7\x00X\x14\x16\x85\x89O\x00,\x10<[\x01\
89+
\xb0P\xf0L\x05\xc0\xa8\x88\xcd/\x00\x16\x0f\x9e\x9f\x00\
90+
XD\x98\xe0\x04@\x04\xf0\xac\x04\xc0\xc2\xc23\x12\x00\
91+
\xa3%6\xbf\x00Xlx\x1e\x02`\xd1a\x22\x13\x00\
92+
\x11\xc0\xbd\x17\x00\x0b\x11\xf7\x5c\x00\x8c\xa2\xd8\xfc\x02`\
93+
q\xe2\xfe\x0a\x80E\x8a\x09K\x00D\x00\xf7R\x00,\
94+
\x5c\xdcC\x010\xbab\xf3\x0b\x80\xc5\x8c\xfb%\x00\x16\
95+
\xb5\xfb\x84\x00X\xdc\x8eK\x08\x80\x08\xb8'\x08\x80w\
96+
;\x9b\x1f\x01\xb0\xf8]?\x02`\x13\x98\x80\x10\x00\x11\
97+
p\xad\x08\xc0\x08\x0b\xad\xe5\xd7\xfb\xa9\xd7f\xf3\x0b\x80\
98+
\x05s\xe2h\x9c\x10\x11\xaf9l\x02x\xe7!\xf4\xfe\
99+
\xe0Z\xbc\xe6Q\xc3t\xd6k\xef\xe1\x9a\xeb\x88\x0fa\
100+
\x94j\xb7x\xcd{\xbfN\xea7\xfbz\xb9\xe6:\xd2\
101+
M\x1dq\xb1m\xb9\xa6\xab\xafy\xeb\xd7\x1b\xe9Y\xec\
102+
Y[=]w\xf9\xf9\x07\xd34=\x94\x91\xad\xe6y\
103+
\x8e|\xc6g]\xf7\xb3\xbf\xf7\x93\xd6u\xfdg\xcf\xdf\
104+
-a\x04=\xf7\xba\xfd\x1e\x00\x04\x13\x00\x10\x00@\x00\
105+
\x00\x01\x00\x04\x00\x10\x00@\x00\x00\x01\x00\x04\x00\x10\x00\
106+
@\x00\x00\x01\x00\x04\x00\x10\x00@\x00\x00\x01\x00\x04\x00\
107+
\x10\x00@\x00\x00\x01\x00\x04\x00\x18=\x00g\xff\x7f\xcf\
108+
\xa1W\xdf\xd8\x1b5\xe5B\xc1\xe6o\xe8\x08 \x02\xf0\
109+
\xfd\xbdPS/\x1c\xd27\xff\xed\xf6\xe4\xb3\x01o\xb7\
110+
\xf3?\x1f\xf0\x15\x9f\x1b\x88M\x7f\xae\xa6?\x1b\xd0D\
111+
0V<=\xcf\xf6\xf91\xe0@\xef*6\x1c\x02 \
112+
\x04n\x02\x9b\xc6\xff\x97\x01x\xf6\x1f\x22\x02\x98\x00p\
113+
$ !\x00\xa6\x00\xd3\x00c\x8f\xff&\x00\x11 \xdc\
114+
\x7f\xdf\xe5\xbf\xf5;\x01\x9c\xe3\xca\x1f\x17\x0aO\xdb\xef\
115+
\xfe\x9b&\x00G\x01\xd3\x00cn~G\x00\x11\xc0\x11\
116+
`\x1bG\x01G\x02\xa1\x19\xeb\xdd\x7f\xd7\x04\xe0(`\
117+
\x1a`\xac\xcd\xbf\xfb\x08 \x02\x22\xc08\x9b\x7f\xd7\x11\
118+
\xc0q\xc0\x91@X\xc6\xda\xfc\xbb'\x00\x93\x80i\x80\
119+
q6\xff\xdb\x01\x10\x01\x11\xa0\xff\xcd\xff\xf6\x11\xc0q\
120+
\xc0\x91@H\xfa\xdf\xfc\x87&\x00\x93\x80i\x80\xbe7\
121+
\xffG&\x00\xd3\x80I@<\xfa\xdb\xf8\xa7\x04@\x08\
122+
\x84@\x00\xfa\xd8\xf8\xa7\x06@\x08D@\x00\xda\xde\xf8\
123+
\x97\x04@\x08\xb2# \x00\xedn\xfcK\x03 \x08\x99\
124+
\x11\x10\x80\xf66|\x13\x01`\xach\xbe\x0a\xc1\xd9\x01\
125+
\xf0\x13\xa8\xe3\xfcs`\xef\x0c\x87y\xa7\x17\x00D@\
126+
\x08\x04\x80+\x22`\x1a@\x00\x84@\x048\xcc7Q\
127+
:\x97\xfc\x13\x15\xdf\x044\x01\x98\x04l\x02L\x00$\
128+
N\x03\xe2g\x02\xc0\x86@\x00\x10\x01\x1c\x01\x88:\x12\
129+
\x88\x9d\x09\x00\x1b\x04\x01@\x04p\x04 \xeaH n\
130+
&\x00l\x18\x04\x00\x11\xc0\x11\x80\xa8#\x81\x98\x99\x00\
131+
\xb0\x81\x10\x00D\x00G\x00\xa2\x8e\x04\xe2e\x02\xc0\x86\
132+
B\x00\x10\x01\x1c\x01\x88:\x12\x88\x95\x09\x00\x1b\x0c\x01\
133+
@\x04p\x04 \xeaH N&\x00l8\x04\x00\x11\
134+
\xc0\x11\x80\xa8#\x81\x18\x99\x00\xb0\x01\x11\x00D\x00G\
135+
\x00\xa2\x8e\x04\xe2c\x02\xc04\x80\x09\x80\xc4i@p\
136+
L\x00\x98\x06\x10\x00D\x00\x01@\x04\xf0=\x002\xbe\
137+
/ .&\x00L\x03\x08\x00\x22\x80#\x00QG\x02\
138+
11\x01`\x1a@\x00\x10\x01\x1c\x01\x88:\x12\x88\x87\
139+
\x00\x10\x1a\x01\x9b_\x00\x08\x8d\x80\xcd\x0fA1\xe8\xfd\
140+
S\x8c\x01\x00\xda\xf2\x07\xc0\xb4\x09d\x9d\x1fRw\x00\
141+
\x00\x00\x00IEND\xaeB`\x82\
142+
"
143+
144+
qt_resource_name = b"\
145+
\x00\x08\
146+
\x0aaZ\xa7\
147+
\x00i\
148+
\x00c\x00o\x00n\x00.\x00p\x00n\x00g\
149+
"
150+
151+
qt_resource_struct = b"\
152+
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
153+
\x00\x00\x00\x00\x00\x00\x00\x00\
154+
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
155+
\x00\x00\x01\x847\x9eu\x9f\
156+
"
157+
158+
159+
def qInitResources():
160+
QtCore.qRegisterResourceData(
161+
0x03, qt_resource_struct, qt_resource_name, qt_resource_data
162+
)
163+
164+
165+
def qCleanupResources():
166+
QtCore.qUnregisterResourceData(
167+
0x03, qt_resource_struct, qt_resource_name, qt_resource_data
168+
)
169+
170+
171+
qInitResources()

manim_slides/wizard.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import click
77
from PySide6.QtCore import Qt
8+
from PySide6.QtGui import QIcon
89
from PySide6.QtWidgets import (
910
QApplication,
1011
QDialog,
@@ -21,6 +22,7 @@
2122
from .config import Config, Key
2223
from .defaults import CONFIG_PATH
2324
from .manim import logger
25+
from .resources import * # noqa: F401, F403
2426

2527
WINDOW_NAME: str = "Configuration Wizard"
2628

@@ -54,6 +56,8 @@ def __init__(self, config: Config):
5456

5557
self.setWindowTitle(WINDOW_NAME)
5658
self.config = config
59+
self.icon = QIcon(":/icon.png")
60+
self.setWindowIcon(self.icon)
5761

5862
QBtn = QDialogButtonBox.Save | QDialogButtonBox.Cancel
5963

pyproject.toml

Lines changed: 0 additions & 2 deletions
This file was deleted.

static/icon.png

2.03 KB
Loading

0 commit comments

Comments
 (0)