-
Notifications
You must be signed in to change notification settings - Fork 0
/
pixMp.py
32 lines (29 loc) · 2.25 KB
/
pixMp.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copyright (c) 2020 Vishnu J. Seesahai
# Use of this source code is governed by an MIT
# license that can be found in the LICENSE file.
import os, sys
from PyQt5.QtGui import *
#from resource import resource_path
def resource_path(relative_path):
#dir = QDir.currentPath()
if hasattr(sys, '_MEIPASS'):
return os.path.join(sys._MEIPASS, relative_path)
return os.path.join(os.path.abspath('.'), relative_path)
def set_pixmaps():
# Pixmap Imgs
global pixmap_balance_btn, pixmap_balance_btn2, pixmap_addr_btn, pixmap_addr_btn2, pixmap_magic_btn, pixmap_magic_btn2
global icons, pixmap_send_btn, pixmap_send_btn2, pixmap_receive_btn, pixmap_receive_btn2, pixmap_transaction_btn, pixmap_transaction_btn2
pixmap_addr_btn = QPixmap(resource_path('img/[email protected]'))
pixmap_addr_btn2 = QPixmap(resource_path('img/[email protected]'))
pixmap_balance_btn = QPixmap(resource_path('img/[email protected]'))
pixmap_balance_btn2 = QPixmap(resource_path('img/[email protected]'))
pixmap_send_btn = QPixmap(resource_path('img/[email protected]'))
pixmap_send_btn2 = QPixmap(resource_path('img/[email protected]'))
pixmap_receive_btn = QPixmap(resource_path('img/[email protected]'))
pixmap_receive_btn2 = QPixmap(resource_path('img/[email protected]'))
pixmap_transaction_btn = QPixmap(resource_path('img/[email protected]'))
pixmap_transaction_btn2 = QPixmap(resource_path('img/[email protected]'))
pixmap_magic_btn = QPixmap(resource_path('img/[email protected]'))
pixmap_magic_btn2 = QPixmap(resource_path('img/[email protected]'))
icons = {'pixmap_magic_btn':pixmap_magic_btn, 'pixmap_magic_btn2':pixmap_magic_btn2, 'pixmap_addr_btn':pixmap_addr_btn, 'pixmap_addr_btn2':pixmap_addr_btn2, 'pixmap_balance_btn': pixmap_balance_btn, 'pixmap_balance_btn2':pixmap_balance_btn2, 'pixmap_send_btn':pixmap_send_btn, 'pixmap_send_btn2':pixmap_send_btn2, 'pixmap_receive_btn':pixmap_receive_btn, 'pixmap_receive_btn2':pixmap_receive_btn2,'pixmap_transaction_btn':pixmap_transaction_btn,'pixmap_transaction_btn2':pixmap_transaction_btn2}
return icons