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
78db11b2
Commit
78db11b2
authored
Feb 08, 2021
by
Adrian Georgescu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed animations
parent
b025d709
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
33 deletions
+32
-33
chatwindow.py
blink/chatwindow.py
+23
-21
contacts.py
blink/contacts.py
+5
-7
sessions.py
blink/sessions.py
+4
-5
No files found.
blink/chatwindow.py
View file @
78db11b2
...
...
@@ -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,16 @@ 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
=
None
self
.
detach_animation
=
QPropertyAnimation
(
self
,
b
'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
=
None
self
.
preview_animation
=
QPropertyAnimation
(
self
.
camera_preview
,
b
'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
)
...
...
@@ -1229,7 +1231,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
):
...
...
@@ -1317,11 +1319,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
)))
...
...
@@ -1329,11 +1331,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
):
...
...
@@ -1367,7 +1369,7 @@ class VideoWidget(VideoSurface, ui_class):
QDesktopServices
.
openUrl
(
QUrl
.
fromLocalFile
(
settings
.
screenshots_directory
.
normalized
))
def
_SH_DetachAnimationFinished
(
self
):
if
self
.
detach_animation
self
.
detach_animation
.
direction
()
==
QPropertyAnimation
.
Backward
:
if
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 @
78db11b2
...
...
@@ -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
,
b
'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,9 +3957,7 @@ class ContactDetailView(QListView):
def
eventFilter
(
self
,
watched
,
event
):
if
event
.
type
()
==
QEvent
.
Resize
:
new_size
=
event
.
size
()
#geometry = self.animation.endValue()
geometry
=
None
# TODO3
geometry
=
self
.
animation
.
endValue
()
if
geometry
is
not
None
:
old_size
=
geometry
.
size
()
geometry
.
setSize
(
new_size
)
...
...
blink/sessions.py
View file @
78db11b2
...
...
@@ -3487,11 +3487,10 @@ class ChatSessionListView(QListView):
self
.
setSelectionMode
(
QListView
.
SingleSelection
)
# default
self
.
setStyleSheet
(
"""QListView { border: 1px inset palette(dark); border-radius: 3px; }"""
)
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
.
animation
=
QPropertyAnimation
(
self
,
b
'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
()
...
...
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