video call icons

This commit is contained in:
ingvar1995 2017-06-18 12:43:11 +03:00
parent df5a1a901a
commit 49fc253c19
6 changed files with 6 additions and 9 deletions

View file

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

View file

@ -533,16 +533,14 @@ class InlineImageItem(QtWidgets.QScrollArea):
self._elem.setSizeHint(QtCore.QSize(self.width(), self.height()))
elif event.button() == QtCore.Qt.RightButton: # save inline
directory = QtWidgets.QFileDialog.getExistingDirectory(self,
QtWidgets.QApplication.translate("MainWindow",
'Choose folder'),
curr_directory(),
QtWidgets.QFileDialog.ShowDirsOnly | QtWidgets.QFileDialog.DontUseNativeDialog)
QtWidgets.QApplication.translate("MainWindow",
'Choose folder'),
curr_directory(),
QtWidgets.QFileDialog.ShowDirsOnly | QtWidgets.QFileDialog.DontUseNativeDialog)
if directory:
fl = QtCore.QFile(directory + '/toxygen_inline_' + curr_time().replace(':', '_') + '.png')
self._pixmap.save(fl, 'PNG')
return False
def mark_as_sent(self):
return False

View file

@ -568,13 +568,12 @@ class MainWindow(QtWidgets.QMainWindow, Singleton):
self.update_call_state('call')
def update_call_state(self, fl):
# TODO: do smth with video call button
os.chdir(curr_directory() + '/images/')
pixmap = QtGui.QPixmap(curr_directory() + '/images/{}.png'.format(fl))
icon = QtGui.QIcon(pixmap)
self.callButton.setIcon(icon)
self.callButton.setIconSize(QtCore.QSize(50, 50))
pixmap = QtGui.QPixmap(curr_directory() + '/images/videocall.png')
pixmap = QtGui.QPixmap(curr_directory() + '/images/{}_video.png')
icon = QtGui.QIcon(pixmap)
self.videocallButton.setIcon(icon)
self.videocallButton.setIconSize(QtCore.QSize(35, 35))

View file

@ -4,7 +4,7 @@ import shutil
import sys
import re
program_version = '0.2.8'
program_version = '0.3.0'
def log(data):