mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
cache stylesheet
This commit is contained in:
parent
aac4e6157d
commit
e8583ccc4a
1 changed files with 11 additions and 1 deletions
|
|
@ -5,7 +5,10 @@ from openpype import resources
|
|||
from avalon.vendor import qtawesome
|
||||
|
||||
|
||||
def load_stylesheet():
|
||||
_STYLESHEET_CACHE = None
|
||||
|
||||
|
||||
def _load_stylesheet():
|
||||
from . import qrc_resources
|
||||
|
||||
qrc_resources.qInitResources()
|
||||
|
|
@ -39,5 +42,12 @@ def load_stylesheet():
|
|||
return stylesheet
|
||||
|
||||
|
||||
def load_stylesheet():
|
||||
global _STYLESHEET_CACHE
|
||||
if _STYLESHEET_CACHE is None:
|
||||
_STYLESHEET_CACHE = _load_stylesheet()
|
||||
return _STYLESHEET_CACHE
|
||||
|
||||
|
||||
def app_icon_path():
|
||||
return resources.pype_icon_filepath()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue