screenshot window update
This commit is contained in:
parent
2e333085f0
commit
59ad6b3ffa
@ -47,10 +47,12 @@ class FileTransfer(QtCore.QObject):
|
|||||||
|
|
||||||
def cancel(self):
|
def cancel(self):
|
||||||
self.send_control(TOX_FILE_CONTROL['CANCEL'])
|
self.send_control(TOX_FILE_CONTROL['CANCEL'])
|
||||||
|
if hasattr(self, '_file'):
|
||||||
self._file.close()
|
self._file.close()
|
||||||
self._state_changed.signal.emit(self.state, self._done / self._size)
|
self._state_changed.signal.emit(self.state, self._done / self._size)
|
||||||
|
|
||||||
def cancelled(self):
|
def cancelled(self):
|
||||||
|
if hasattr(self, '_file'):
|
||||||
self._file.close()
|
self._file.close()
|
||||||
self._state_changed.signal.emit(TOX_FILE_CONTROL['CANCEL'], self._done / self._size)
|
self._state_changed.signal.emit(TOX_FILE_CONTROL['CANCEL'], self._done / self._size)
|
||||||
|
|
||||||
|
@ -379,9 +379,10 @@ class ScreenShotWindow(QtGui.QWidget):
|
|||||||
super(ScreenShotWindow, self).__init__()
|
super(ScreenShotWindow, self).__init__()
|
||||||
self.rubberband = QtGui.QRubberBand(QtGui.QRubberBand.Rectangle, self)
|
self.rubberband = QtGui.QRubberBand(QtGui.QRubberBand.Rectangle, self)
|
||||||
self.setMouseTracking(True)
|
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.setAttribute(QtCore.Qt.WA_TranslucentBackground)
|
||||||
self.showFullScreen()
|
self.showFullScreen()
|
||||||
|
self.setStyleSheet('QWidget { background-color: rgba(255, 255, 255, 190); }')
|
||||||
|
|
||||||
def mousePressEvent(self, event):
|
def mousePressEvent(self, event):
|
||||||
self.origin = event.pos()
|
self.origin = event.pos()
|
||||||
|
Loading…
Reference in New Issue
Block a user