Skip to content

Commit

Permalink
add app icon
Browse files Browse the repository at this point in the history
  • Loading branch information
yconst committed Apr 29, 2024
1 parent 933cf1b commit 1288487
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions studio/Python/Manifest.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include README.md
include tinymovr/resources/icons/app_icon.png
include tinymovr/resources/icons/call.png
include tinymovr/resources/icons/call_dark.png
include tinymovr/resources/icons/[email protected]
Expand Down
7 changes: 7 additions & 0 deletions studio/Python/tinymovr/gui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
import sys
import yaml
import pkg_resources
from importlib_resources import files
from docopt import docopt
from PySide6.QtWidgets import QApplication
from PySide6.QtGui import QIcon, QPixmap
from tinymovr.gui import MainWindow, app_stylesheet, app_stylesheet_dark, is_dark_mode
from tinymovr.constants import app_name
from tinymovr.config import configure_logging, add_spec
Expand Down Expand Up @@ -54,10 +56,15 @@ def spawn():
add_spec(spec_data, logger)

app = QApplication(sys.argv)

icon_path = files("tinymovr").joinpath("resources/icons/app_icon.png")
app.setWindowIcon(QIcon(str(icon_path)))

if is_dark_mode():
app.setStyleSheet(app_stylesheet_dark)
else:
app.setStyleSheet(app_stylesheet)
w = MainWindow(app, arguments, logger)

w.show()
sys.exit(app.exec_())
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1288487

Please sign in to comment.