diff options
author | Blaine | 2020-06-11 02:04:51 +0530 |
---|---|---|
committer | Blaine | 2020-06-11 02:05:21 +0530 |
commit | acccbe3e078fa20732ca357fcd0b47eccd30b44f (patch) | |
tree | 5fde7b957c48647edbe0b6400a9699e27c0a6f02 /src/main/python/utils/app.py | |
parent | d55241d324e61081d0389aa67afacaefd7e15ac4 (diff) | |
download | Chemical-PFD-acccbe3e078fa20732ca357fcd0b47eccd30b44f.tar.gz Chemical-PFD-acccbe3e078fa20732ca357fcd0b47eccd30b44f.tar.bz2 Chemical-PFD-acccbe3e078fa20732ca357fcd0b47eccd30b44f.zip |
ui update
Diffstat (limited to 'src/main/python/utils/app.py')
-rw-r--r-- | src/main/python/utils/app.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main/python/utils/app.py b/src/main/python/utils/app.py index 4cc8228..96a45b0 100644 --- a/src/main/python/utils/app.py +++ b/src/main/python/utils/app.py @@ -3,7 +3,9 @@ Declare fbs application so that it can be imported in other modules. """ from fbs_runtime.application_context.PyQt5 import ApplicationContext -from PyQt5.QtCore import QSettings +from PyQt5.QtCore import QSettings, pyqtProperty +from PyQt5.QtGui import QIcon +from PyQt5.QtWidgets import QWidget from json import JSONEncoder, dumps, loads, dump, load from os.path import join @@ -15,6 +17,9 @@ def fileImporter(*file): # Helper function to fetch files from src/main/resources return app.get_resource(join(*file)) +with open(fileImporter("app.qss"), "r") as stylesheet: + app.app.setStyleSheet(stylesheet.read()) + class JSON_Encoder: def _encode(obj): @@ -52,6 +57,9 @@ class JSON_Typer(JSONEncoder): def encode(self, obj): return super(JSON_Typer, self).encode(self._encode(obj)) - + + +importer = pyqtProperty(str, fileImporter) + shapeGrips = {} lines = {}
\ No newline at end of file |