Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
39d31fe8
Commit
39d31fe8
authored
Feb 07, 2021
by
Adrian Georgescu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable animations until we find the fix for them
parent
d485698c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
36 deletions
+40
-36
chatwindow.py
blink/chatwindow.py
+27
-26
contacts.py
blink/contacts.py
+7
-5
sessions.py
blink/sessions.py
+6
-5
No files found.
blink/chatwindow.py
View file @
39d31fe8
...
...
@@ -897,8 +897,8 @@ class VideoWidget(VideoSurface, ui_class):
self
.
close_button
.
clicked
.
connect
(
self
.
_SH_CloseButtonClicked
)
self
.
screenshot_button
.
customContextMenuRequested
.
connect
(
self
.
_SH_ScreenshotButtonContextMenuRequested
)
self
.
camera_preview
.
adjusted
.
connect
(
self
.
_SH_CameraPreviewAdjusted
)
self
.
detach_animation
.
finished
.
connect
(
self
.
_SH_DetachAnimationFinished
)
self
.
preview_animation
.
finished
.
connect
(
self
.
_SH_PreviewAnimationFinished
)
#
self.detach_animation.finished.connect(self._SH_DetachAnimationFinished)
#
self.preview_animation.finished.connect(self._SH_PreviewAnimationFinished)
self
.
idle_timer
.
timeout
.
connect
(
self
.
_SH_IdleTimerTimeout
)
if
parent
is
not
None
:
parent
.
installEventFilter
(
self
)
...
...
@@ -928,14 +928,14 @@ class VideoWidget(VideoSurface, ui_class):
self
.
camera_preview
.
lower
()
self
.
camera_preview
.
scale_factor
=
1.0
self
.
detach_animation
=
QPropertyAnimation
(
self
,
'geometry'
)
self
.
detach_animation
.
setDuration
(
200
)
#
self.detach_animation.setEasingCurve(QEasingCurve.Linear)
#
self.detach_animation = QPropertyAnimation(self, 'geometry')
#
self.detach_animation.setDuration(200)
#self.detach_animation.setEasingCurve(QEasingCurve.Linear)
self
.
preview_animation
=
QPropertyAnimation
(
self
.
camera_preview
,
'geometry'
)
self
.
preview_animation
.
setDuration
(
500
)
self
.
preview_animation
.
setDirection
(
QPropertyAnimation
.
Forward
)
self
.
preview_animation
.
setEasingCurve
(
QEasingCurve
.
OutQuad
)
#
self.preview_animation = QPropertyAnimation(self.camera_preview, 'geometry')
#
self.preview_animation.setDuration(500)
#
self.preview_animation.setDirection(QPropertyAnimation.Forward)
#
self.preview_animation.setEasingCurve(QEasingCurve.OutQuad)
self
.
idle_timer
=
QTimer
()
self
.
idle_timer
.
setSingleShot
(
True
)
...
...
@@ -1047,7 +1047,7 @@ class VideoWidget(VideoSurface, ui_class):
self
.
idle_timer
.
start
()
def
resizeEvent
(
self
,
event
):
if
self
.
preview_animation
.
state
()
==
QPropertyAnimation
.
Running
:
if
self
.
preview_animation
and
self
.
preview_animation
.
state
()
==
QPropertyAnimation
.
Running
:
return
if
not
event
.
oldSize
()
.
isValid
():
...
...
@@ -1229,7 +1229,7 @@ class VideoWidget(VideoSurface, ui_class):
self
.
session_item
=
None
self
.
blink_session
=
None
self
.
parent_widget
=
None
self
.
detach_animation
=
None
#
self.detach_animation = None
self
.
preview_animation
=
None
def
_NH_BlinkSessionDidChangeHoldState
(
self
,
notification
):
...
...
@@ -1240,10 +1240,11 @@ class VideoWidget(VideoSurface, ui_class):
self
.
setGeometry
(
self
.
geometryHint
())
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
():
self
.
preview_animation
.
setStartValue
(
self
.
rect
())
self
.
preview_animation
.
setEndValue
(
QRect
(
0
,
0
,
self
.
camera_preview
.
width_for_height
(
81
),
81
))
self
.
preview_animation
.
start
()
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
.
setEndValue
(
QRect
(
0
,
0
,
self
.
camera_preview
.
width_for_height
(
81
),
81
))
self
.
preview_animation
.
start
()
def
_NH_VideoDeviceDidChangeCamera
(
self
,
notification
):
# self.camera_preview.producer = SIPApplication.video_device.producer
...
...
@@ -1316,11 +1317,11 @@ class VideoWidget(VideoSurface, ui_class):
self
.
show
()
self
.
no_flicker_widget
.
hide
()
self
.
detach_animation
.
setDirection
(
QPropertyAnimation
.
Forward
)
self
.
detach_animation
.
setEasingCurve
(
QEasingCurve
.
OutQuad
)
self
.
detach_animation
.
setStartValue
(
start_geometry
)
self
.
detach_animation
.
setEndValue
(
final_geometry
)
self
.
detach_animation
.
start
()
##
self.detach_animation.setDirection(QPropertyAnimation.Forward)
##
self.detach_animation.setEasingCurve(QEasingCurve.OutQuad)
##
self.detach_animation.setStartValue(start_geometry)
#
self.detach_animation.setEndValue(final_geometry)
#
self.detach_animation.start()
else
:
start_geometry
=
self
.
geometry
()
final_geometry
=
self
.
geometryHint
(
self
.
parent_widget
)
.
translated
(
self
.
parent_widget
.
mapToGlobal
(
QPoint
(
0
,
0
)))
...
...
@@ -1328,11 +1329,11 @@ class VideoWidget(VideoSurface, ui_class):
# do this early or late? -Dan
self
.
parent_widget
.
window
()
.
show
()
self
.
detach_animation
.
setDirection
(
QPropertyAnimation
.
Backward
)
self
.
detach_animation
.
setEasingCurve
(
QEasingCurve
.
InQuad
)
self
.
detach_animation
.
setStartValue
(
final_geometry
)
# start and end are reversed because we go backwards
self
.
detach_animation
.
setEndValue
(
start_geometry
)
self
.
detach_animation
.
start
()
#
self.detach_animation.setDirection(QPropertyAnimation.Backward)
#
self.detach_animation.setEasingCurve(QEasingCurve.InQuad)
#
self.detach_animation.setStartValue(final_geometry) # start and end are reversed because we go backwards
#
self.detach_animation.setEndValue(start_geometry)
#
self.detach_animation.start()
self
.
fullscreen_button
.
setChecked
(
False
)
def
_SH_ScreenshotButtonClicked
(
self
):
...
...
@@ -1366,7 +1367,7 @@ class VideoWidget(VideoSurface, ui_class):
QDesktopServices
.
openUrl
(
QUrl
.
fromLocalFile
(
settings
.
screenshots_directory
.
normalized
))
def
_SH_DetachAnimationFinished
(
self
):
if
self
.
detach_animation
.
direction
()
==
QPropertyAnimation
.
Backward
:
if
self
.
detach_animation
self
.
detach_animation
.
direction
()
==
QPropertyAnimation
.
Backward
:
pixmap
=
self
.
grab
()
self
.
no_flicker_widget
.
resize
(
pixmap
.
size
())
self
.
no_flicker_widget
.
setPixmap
(
pixmap
)
...
...
blink/contacts.py
View file @
39d31fe8
...
...
@@ -3915,10 +3915,10 @@ class ContactDetailView(QListView):
self
.
setAlternatingRowColors
(
True
)
self
.
setSelectionMode
(
QListView
.
SingleSelection
)
self
.
setDropIndicatorShown
(
False
)
self
.
animation
=
QPropertyAnimation
(
self
,
'geometry'
)
self
.
animation
.
setDuration
(
250
)
self
.
animation
.
setEasingCurve
(
QEasingCurve
.
Linear
)
self
.
animation
.
finished
.
connect
(
self
.
_SH_AnimationFinished
)
#
self.animation = QPropertyAnimation(self, 'geometry')
#
self.animation.setDuration(250)
#
self.animation.setEasingCurve(QEasingCurve.Linear)
#
self.animation.finished.connect(self._SH_AnimationFinished)
self
.
context_menu
=
QMenu
(
self
)
self
.
actions
=
ContextMenuActions
()
self
.
actions
.
delete_contact
=
QAction
(
"Delete Contact"
,
self
,
triggered
=
self
.
_AH_DeleteContact
)
...
...
@@ -3957,7 +3957,9 @@ class ContactDetailView(QListView):
def
eventFilter
(
self
,
watched
,
event
):
if
event
.
type
()
==
QEvent
.
Resize
:
new_size
=
event
.
size
()
geometry
=
self
.
animation
.
endValue
()
#geometry = self.animation.endValue()
geometry
=
None
# TODO3
if
geometry
is
not
None
:
old_size
=
geometry
.
size
()
geometry
.
setSize
(
new_size
)
...
...
blink/sessions.py
View file @
39d31fe8
...
...
@@ -3474,10 +3474,11 @@ class ChatSessionListView(QListView):
self
.
setSelectionMode
(
QListView
.
SingleSelection
)
# default
self
.
setStyleSheet
(
"""QListView { border: 1px inset palette(dark); border-radius: 3px; }"""
)
self
.
animation
=
QPropertyAnimation
(
self
,
'geometry'
)
self
.
animation
.
setDuration
(
250
)
self
.
animation
.
setEasingCurve
(
QEasingCurve
.
Linear
)
self
.
animation
.
finished
.
connect
(
self
.
_SH_AnimationFinished
)
self
.
animation
=
None
#self.animation = QPropertyAnimation(self, 'geometry')
#self.animation.setDuration(250)
#self.animation.setEasingCurve(QEasingCurve.Linear)
#self.animation.finished.connect(self._SH_AnimationFinished)
self
.
context_menu
=
QMenu
(
self
)
self
.
actions
=
ContextMenuActions
()
self
.
drop_indicator_index
=
QModelIndex
()
...
...
@@ -3527,7 +3528,7 @@ class ChatSessionListView(QListView):
def
eventFilter
(
self
,
watched
,
event
):
if
event
.
type
()
==
QEvent
.
Resize
:
new_size
=
event
.
size
()
geometry
=
self
.
animation
.
endValue
()
geometry
=
self
.
animation
.
endValue
()
if
self
.
animation
else
None
if
geometry
is
not
None
:
old_size
=
geometry
.
size
()
geometry
.
setSize
(
new_size
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment