icons fixes

This commit is contained in:
ingvar1995 2017-06-18 13:05:26 +03:00
parent 49fc253c19
commit 7a817eb82a
2 changed files with 6 additions and 4 deletions

View file

@ -567,13 +567,15 @@ class MainWindow(QtWidgets.QMainWindow, Singleton):
def call_finished(self):
self.update_call_state('call')
def update_call_state(self, fl):
def update_call_state(self, state):
os.chdir(curr_directory() + '/images/')
pixmap = QtGui.QPixmap(curr_directory() + '/images/{}.png'.format(fl))
pixmap = QtGui.QPixmap(curr_directory() + '/images/{}.png'.format(state))
icon = QtGui.QIcon(pixmap)
self.callButton.setIcon(icon)
self.callButton.setIconSize(QtCore.QSize(50, 50))
pixmap = QtGui.QPixmap(curr_directory() + '/images/{}_video.png')
pixmap = QtGui.QPixmap(curr_directory() + '/images/{}_video.png'.format(state))
icon = QtGui.QIcon(pixmap)
self.videocallButton.setIcon(icon)
self.videocallButton.setIconSize(QtCore.QSize(35, 35))

View file

@ -1257,7 +1257,7 @@ class Profile(basecontact.BaseContact, Singleton):
if hasattr(self, '_call_widget'):
self._call_widget[friend_number].close()
del self._call_widget[friend_number]
threading.Timer(3.0, lambda: cv2.destroyWindow(str(friend_number))).start()
threading.Timer(2.0, lambda: cv2.destroyWindow(str(friend_number))).start()
friend = self.get_friend_by_number(friend_number)
friend.append_message(InfoMessage(text, time.time()))
if friend_number == self.get_active_number():