used new resource way of getting pype icon in code

This commit is contained in:
iLLiCiTiT 2020-06-24 15:05:22 +02:00
parent 52eb6e2280
commit c7bcac6b46
6 changed files with 24 additions and 33 deletions

View file

@ -1,6 +1,7 @@
import os
from Qt import QtCore, QtGui, QtWidgets
from avalon import style
from pype.api import resources
class MusterLogin(QtWidgets.QWidget):
@ -23,10 +24,7 @@ class MusterLogin(QtWidgets.QWidget):
elif hasattr(parent, 'parent') and hasattr(parent.parent, 'icon'):
self.setWindowIcon(parent.parent.icon)
else:
pype_setup = os.getenv('PYPE_SETUP_PATH')
items = [pype_setup, "app", "resources", "icon.png"]
fname = os.path.sep.join(items)
icon = QtGui.QIcon(fname)
icon = QtGui.QIcon(resources.pype_icon_filepath())
self.setWindowIcon(icon)
self.setWindowFlags(