Commit 39d31fe8 authored by Adrian Georgescu's avatar Adrian Georgescu

Disable animations until we find the fix for them

parent d485698c
...@@ -897,8 +897,8 @@ class VideoWidget(VideoSurface, ui_class): ...@@ -897,8 +897,8 @@ class VideoWidget(VideoSurface, ui_class):
self.close_button.clicked.connect(self._SH_CloseButtonClicked) self.close_button.clicked.connect(self._SH_CloseButtonClicked)
self.screenshot_button.customContextMenuRequested.connect(self._SH_ScreenshotButtonContextMenuRequested) self.screenshot_button.customContextMenuRequested.connect(self._SH_ScreenshotButtonContextMenuRequested)
self.camera_preview.adjusted.connect(self._SH_CameraPreviewAdjusted) self.camera_preview.adjusted.connect(self._SH_CameraPreviewAdjusted)
self.detach_animation.finished.connect(self._SH_DetachAnimationFinished) #self.detach_animation.finished.connect(self._SH_DetachAnimationFinished)
self.preview_animation.finished.connect(self._SH_PreviewAnimationFinished) #self.preview_animation.finished.connect(self._SH_PreviewAnimationFinished)
self.idle_timer.timeout.connect(self._SH_IdleTimerTimeout) self.idle_timer.timeout.connect(self._SH_IdleTimerTimeout)
if parent is not None: if parent is not None:
parent.installEventFilter(self) parent.installEventFilter(self)
...@@ -928,14 +928,14 @@ class VideoWidget(VideoSurface, ui_class): ...@@ -928,14 +928,14 @@ class VideoWidget(VideoSurface, ui_class):
self.camera_preview.lower() self.camera_preview.lower()
self.camera_preview.scale_factor = 1.0 self.camera_preview.scale_factor = 1.0
self.detach_animation = QPropertyAnimation(self, 'geometry') #self.detach_animation = QPropertyAnimation(self, 'geometry')
self.detach_animation.setDuration(200) #self.detach_animation.setDuration(200)
# self.detach_animation.setEasingCurve(QEasingCurve.Linear) #self.detach_animation.setEasingCurve(QEasingCurve.Linear)
self.preview_animation = QPropertyAnimation(self.camera_preview, 'geometry') #self.preview_animation = QPropertyAnimation(self.camera_preview, 'geometry')
self.preview_animation.setDuration(500) #self.preview_animation.setDuration(500)
self.preview_animation.setDirection(QPropertyAnimation.Forward) #self.preview_animation.setDirection(QPropertyAnimation.Forward)
self.preview_animation.setEasingCurve(QEasingCurve.OutQuad) #self.preview_animation.setEasingCurve(QEasingCurve.OutQuad)
self.idle_timer = QTimer() self.idle_timer = QTimer()
self.idle_timer.setSingleShot(True) self.idle_timer.setSingleShot(True)
...@@ -1047,7 +1047,7 @@ class VideoWidget(VideoSurface, ui_class): ...@@ -1047,7 +1047,7 @@ class VideoWidget(VideoSurface, ui_class):
self.idle_timer.start() self.idle_timer.start()
def resizeEvent(self, event): def resizeEvent(self, event):
if self.preview_animation.state() == QPropertyAnimation.Running: if self.preview_animation and self.preview_animation.state() == QPropertyAnimation.Running:
return return
if not event.oldSize().isValid(): if not event.oldSize().isValid():
...@@ -1229,7 +1229,7 @@ class VideoWidget(VideoSurface, ui_class): ...@@ -1229,7 +1229,7 @@ class VideoWidget(VideoSurface, ui_class):
self.session_item = None self.session_item = None
self.blink_session = None self.blink_session = None
self.parent_widget = None self.parent_widget = None
self.detach_animation = None #self.detach_animation = None
self.preview_animation = None self.preview_animation = None
def _NH_BlinkSessionDidChangeHoldState(self, notification): def _NH_BlinkSessionDidChangeHoldState(self, notification):
...@@ -1240,7 +1240,8 @@ class VideoWidget(VideoSurface, ui_class): ...@@ -1240,7 +1240,8 @@ class VideoWidget(VideoSurface, ui_class):
self.setGeometry(self.geometryHint()) self.setGeometry(self.geometryHint())
def _NH_VideoStreamReceivedKeyFrame(self, notification): def _NH_VideoStreamReceivedKeyFrame(self, notification):
if notification.sender.blink_session is self.blink_session and self.preview_animation.state() != QPropertyAnimation.Running and self.camera_preview.size() == self.size(): if notification.sender.blink_session is self.blink_session and self.preview_animation and self.preview_animation.state() != QPropertyAnimation.Running and self.camera_preview.size() == self.size():
if self.preview_animation:
self.preview_animation.setStartValue(self.rect()) self.preview_animation.setStartValue(self.rect())
self.preview_animation.setEndValue(QRect(0, 0, self.camera_preview.width_for_height(81), 81)) self.preview_animation.setEndValue(QRect(0, 0, self.camera_preview.width_for_height(81), 81))
self.preview_animation.start() self.preview_animation.start()
...@@ -1316,11 +1317,11 @@ class VideoWidget(VideoSurface, ui_class): ...@@ -1316,11 +1317,11 @@ class VideoWidget(VideoSurface, ui_class):
self.show() self.show()
self.no_flicker_widget.hide() self.no_flicker_widget.hide()
self.detach_animation.setDirection(QPropertyAnimation.Forward) ##self.detach_animation.setDirection(QPropertyAnimation.Forward)
self.detach_animation.setEasingCurve(QEasingCurve.OutQuad) ##self.detach_animation.setEasingCurve(QEasingCurve.OutQuad)
self.detach_animation.setStartValue(start_geometry) ##self.detach_animation.setStartValue(start_geometry)
self.detach_animation.setEndValue(final_geometry) #self.detach_animation.setEndValue(final_geometry)
self.detach_animation.start() #self.detach_animation.start()
else: else:
start_geometry = self.geometry() start_geometry = self.geometry()
final_geometry = self.geometryHint(self.parent_widget).translated(self.parent_widget.mapToGlobal(QPoint(0, 0))) final_geometry = self.geometryHint(self.parent_widget).translated(self.parent_widget.mapToGlobal(QPoint(0, 0)))
...@@ -1328,11 +1329,11 @@ class VideoWidget(VideoSurface, ui_class): ...@@ -1328,11 +1329,11 @@ class VideoWidget(VideoSurface, ui_class):
# do this early or late? -Dan # do this early or late? -Dan
self.parent_widget.window().show() self.parent_widget.window().show()
self.detach_animation.setDirection(QPropertyAnimation.Backward) #self.detach_animation.setDirection(QPropertyAnimation.Backward)
self.detach_animation.setEasingCurve(QEasingCurve.InQuad) #self.detach_animation.setEasingCurve(QEasingCurve.InQuad)
self.detach_animation.setStartValue(final_geometry) # start and end are reversed because we go backwards #self.detach_animation.setStartValue(final_geometry) # start and end are reversed because we go backwards
self.detach_animation.setEndValue(start_geometry) #self.detach_animation.setEndValue(start_geometry)
self.detach_animation.start() #self.detach_animation.start()
self.fullscreen_button.setChecked(False) self.fullscreen_button.setChecked(False)
def _SH_ScreenshotButtonClicked(self): def _SH_ScreenshotButtonClicked(self):
...@@ -1366,7 +1367,7 @@ class VideoWidget(VideoSurface, ui_class): ...@@ -1366,7 +1367,7 @@ class VideoWidget(VideoSurface, ui_class):
QDesktopServices.openUrl(QUrl.fromLocalFile(settings.screenshots_directory.normalized)) QDesktopServices.openUrl(QUrl.fromLocalFile(settings.screenshots_directory.normalized))
def _SH_DetachAnimationFinished(self): def _SH_DetachAnimationFinished(self):
if self.detach_animation.direction() == QPropertyAnimation.Backward: if self.detach_animationself.detach_animation.direction() == QPropertyAnimation.Backward:
pixmap = self.grab() pixmap = self.grab()
self.no_flicker_widget.resize(pixmap.size()) self.no_flicker_widget.resize(pixmap.size())
self.no_flicker_widget.setPixmap(pixmap) self.no_flicker_widget.setPixmap(pixmap)
......
...@@ -3915,10 +3915,10 @@ class ContactDetailView(QListView): ...@@ -3915,10 +3915,10 @@ class ContactDetailView(QListView):
self.setAlternatingRowColors(True) self.setAlternatingRowColors(True)
self.setSelectionMode(QListView.SingleSelection) self.setSelectionMode(QListView.SingleSelection)
self.setDropIndicatorShown(False) self.setDropIndicatorShown(False)
self.animation = QPropertyAnimation(self, 'geometry') #self.animation = QPropertyAnimation(self, 'geometry')
self.animation.setDuration(250) #self.animation.setDuration(250)
self.animation.setEasingCurve(QEasingCurve.Linear) #self.animation.setEasingCurve(QEasingCurve.Linear)
self.animation.finished.connect(self._SH_AnimationFinished) #self.animation.finished.connect(self._SH_AnimationFinished)
self.context_menu = QMenu(self) self.context_menu = QMenu(self)
self.actions = ContextMenuActions() self.actions = ContextMenuActions()
self.actions.delete_contact = QAction("Delete Contact", self, triggered=self._AH_DeleteContact) self.actions.delete_contact = QAction("Delete Contact", self, triggered=self._AH_DeleteContact)
...@@ -3957,7 +3957,9 @@ class ContactDetailView(QListView): ...@@ -3957,7 +3957,9 @@ class ContactDetailView(QListView):
def eventFilter(self, watched, event): def eventFilter(self, watched, event):
if event.type() == QEvent.Resize: if event.type() == QEvent.Resize:
new_size = event.size() new_size = event.size()
geometry = self.animation.endValue() #geometry = self.animation.endValue()
geometry = None
# TODO3
if geometry is not None: if geometry is not None:
old_size = geometry.size() old_size = geometry.size()
geometry.setSize(new_size) geometry.setSize(new_size)
......
...@@ -3474,10 +3474,11 @@ class ChatSessionListView(QListView): ...@@ -3474,10 +3474,11 @@ class ChatSessionListView(QListView):
self.setSelectionMode(QListView.SingleSelection) # default self.setSelectionMode(QListView.SingleSelection) # default
self.setStyleSheet("""QListView { border: 1px inset palette(dark); border-radius: 3px; }""") self.setStyleSheet("""QListView { border: 1px inset palette(dark); border-radius: 3px; }""")
self.animation = QPropertyAnimation(self, 'geometry') self.animation = None
self.animation.setDuration(250) #self.animation = QPropertyAnimation(self, 'geometry')
self.animation.setEasingCurve(QEasingCurve.Linear) #self.animation.setDuration(250)
self.animation.finished.connect(self._SH_AnimationFinished) #self.animation.setEasingCurve(QEasingCurve.Linear)
#self.animation.finished.connect(self._SH_AnimationFinished)
self.context_menu = QMenu(self) self.context_menu = QMenu(self)
self.actions = ContextMenuActions() self.actions = ContextMenuActions()
self.drop_indicator_index = QModelIndex() self.drop_indicator_index = QModelIndex()
...@@ -3527,7 +3528,7 @@ class ChatSessionListView(QListView): ...@@ -3527,7 +3528,7 @@ class ChatSessionListView(QListView):
def eventFilter(self, watched, event): def eventFilter(self, watched, event):
if event.type() == QEvent.Resize: if event.type() == QEvent.Resize:
new_size = event.size() new_size = event.size()
geometry = self.animation.endValue() geometry = self.animation.endValue() if self.animation else None
if geometry is not None: if geometry is not None:
old_size = geometry.size() old_size = geometry.size()
geometry.setSize(new_size) geometry.setSize(new_size)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment