moved eye to settings tool resources

This commit is contained in:
iLLiCiTiT 2021-05-03 12:47:09 +02:00
parent c970067c7e
commit 6dc1c03902
3 changed files with 10 additions and 1 deletions

View file

@ -0,0 +1,8 @@
import os
RESOURCES_DIR = os.path.dirname(os.path.abspath(__file__))
def get_resource(*args):
return os.path.normpath(os.path.join(RESOURCES_DIR, *args))

View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before After
Before After

View file

@ -2,6 +2,7 @@ import os
from Qt import QtWidgets, QtCore, QtGui
from openpype.api import get_system_settings
from .resources import get_resource
class PasswordDialog(QtWidgets.QDialog):
@ -32,7 +33,7 @@ class PasswordDialog(QtWidgets.QDialog):
current_dir = os.path.join(
os.path.dirname(os.path.abspath(__file__))
)
show_password_icon_path = os.path.join(current_dir, "eye.png")
show_password_icon_path = get_resource("images", "eye.png")
show_password_icon = QtGui.QIcon(show_password_icon_path)
show_password_btn = QtWidgets.QPushButton(password_widget)
show_password_btn.setIcon(show_password_icon)