screenshot window update

This commit is contained in:
ingvar1995 2016-03-23 18:22:32 +03:00
parent 2e333085f0
commit 59ad6b3ffa
2 changed files with 6 additions and 3 deletions

View file

@ -47,11 +47,13 @@ class FileTransfer(QtCore.QObject):
def cancel(self):
self.send_control(TOX_FILE_CONTROL['CANCEL'])
self._file.close()
if hasattr(self, '_file'):
self._file.close()
self._state_changed.signal.emit(self.state, self._done / self._size)
def cancelled(self):
self._file.close()
if hasattr(self, '_file'):
self._file.close()
self._state_changed.signal.emit(TOX_FILE_CONTROL['CANCEL'], self._done / self._size)
def send_control(self, control):

View file

@ -379,9 +379,10 @@ class ScreenShotWindow(QtGui.QWidget):
super(ScreenShotWindow, self).__init__()
self.rubberband = QtGui.QRubberBand(QtGui.QRubberBand.Rectangle, self)
self.setMouseTracking(True)
self.setWindowFlags(self.windowFlags() | QtCore.Qt.FramelessWindowHint | QtCore.Qt.FramelessWindowHint)
self.setWindowFlags(self.windowFlags() | QtCore.Qt.FramelessWindowHint | QtCore.Qt.FramelessWindowHint | QtCore.Qt.WindowStaysOnTopHint)
self.setAttribute(QtCore.Qt.WA_TranslucentBackground)
self.showFullScreen()
self.setStyleSheet('QWidget { background-color: rgba(255, 255, 255, 190); }')
def mousePressEvent(self, event):
self.origin = event.pos()