Skip to content

Commit

Permalink
Add gui program icons
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfG committed Mar 31, 2022
1 parent ace10f8 commit 3a85890
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DeepLC
data/
*.png
./*.png
*.pyc
datasets/an_data.csv
datasets/integrated_dataset_filtered.csv
Expand Down
15 changes: 9 additions & 6 deletions deeplc/gui.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
"""Graphical user interface."""
from multiprocessing import freeze_support
from pathlib import Path
import importlib.resources

from gooey import Gooey, local_resource_path

from deeplc import package_data
import deeplc.package_data.gui_images as img_module
from deeplc.__main__ import main


with importlib.resources.path(package_data, "gui_images") as img_dir:
_IMG_DIR = img_dir
# Get path to package_data/images
# Workaround with parent of specific file required for Python 3.9+ support
with importlib.resources.path(img_module, 'config_icon.png') as resource:
_IMG_DIR = Path(resource).parent


@Gooey(
program_name="DeepLC",
image_dir=local_resource_path(_IMG_DIR),
tabbed_groups=True,
default_size=(760, 720),
target="deeplc",
suppress_gooey_flag=True,
default_size=(720, 480),
monospace_display=True,
)
def start_gui():
"""Run main with GUI enabled."""
main(gui=True)

if __name__ == "__main__":
freeze_support() # Required for multiprocessing with PyInstaller
start_gui()
Empty file.
Binary file added deeplc/package_data/gui_images/config_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added deeplc/package_data/gui_images/program_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/deeplc.icns
Binary file not shown.
Binary file added img/deeplc.ico
Binary file not shown.

0 comments on commit 3a85890

Please sign in to comment.