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
5ed15087
Commit
5ed15087
authored
Oct 10, 2016
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed handling mouse wheel events after the Qt5 migration
parent
d715a5ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
chatwindow.py
blink/chatwindow.py
+3
-2
vncviewer.py
blink/screensharing/vncviewer.py
+11
-5
No files found.
blink/chatwindow.py
View file @
5ed15087
...
...
@@ -1955,10 +1955,11 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
elif
watched
in
(
self
.
latency_graph
,
self
.
packet_loss_graph
,
self
.
traffic_graph
):
if
event_type
==
QEvent
.
Wheel
and
event
.
modifiers
()
==
Qt
.
ControlModifier
:
settings
=
BlinkSettings
()
if
event
.
delta
()
>
0
and
settings
.
chat_window
.
session_info
.
graph_time_scale
>
GraphTimeScale
.
min_value
:
wheel_delta
=
event
.
angleDelta
()
.
y
()
if
wheel_delta
>
0
and
settings
.
chat_window
.
session_info
.
graph_time_scale
>
GraphTimeScale
.
min_value
:
settings
.
chat_window
.
session_info
.
graph_time_scale
-=
1
settings
.
save
()
elif
event
.
delta
()
<
0
and
settings
.
chat_window
.
session_info
.
graph_time_scale
<
GraphTimeScale
.
max_value
:
elif
wheel_delta
<
0
and
settings
.
chat_window
.
session_info
.
graph_time_scale
<
GraphTimeScale
.
max_value
:
settings
.
chat_window
.
session_info
.
graph_time_scale
+=
1
settings
.
save
()
elif
watched
in
(
self
.
audio_encryption_label
,
self
.
video_encryption_label
):
...
...
blink/screensharing/vncviewer.py
View file @
5ed15087
...
...
@@ -309,11 +309,17 @@ class VNCViewer(QWidget):
x
=
event
.
x
()
y
=
event
.
y
()
button_mask
=
self
.
button_mask_map
[
event
.
buttons
()]
if
event
.
type
()
==
QEvent
.
Wheel
:
if
event
.
delta
()
>
0
:
wheel_button_mask
=
self
.
button_mask_map
.
vnc
.
WheelUp
if
event
.
orientation
()
==
Qt
.
Vertical
else
self
.
button_mask_map
.
vnc
.
WheelLeft
else
:
wheel_button_mask
=
self
.
button_mask_map
.
vnc
.
WheelDown
if
event
.
orientation
()
==
Qt
.
Vertical
else
self
.
button_mask_map
.
vnc
.
WheelRight
if
event
.
type
()
==
QEvent
.
Wheel
and
event
.
angleDelta
():
wheel_delta
=
event
.
angleDelta
()
wheel_button_mask
=
0
if
wheel_delta
.
y
()
>
0
:
wheel_button_mask
|=
self
.
button_mask_map
.
vnc
.
WheelUp
elif
wheel_delta
.
y
()
<
0
:
wheel_button_mask
|=
self
.
button_mask_map
.
vnc
.
WheelDown
if
wheel_delta
.
x
()
>
0
:
wheel_button_mask
|=
self
.
button_mask_map
.
vnc
.
WheelLeft
elif
wheel_delta
.
x
()
<
0
:
wheel_button_mask
|=
self
.
button_mask_map
.
vnc
.
WheelRight
self
.
client
.
mouse_event
(
x
,
y
,
button_mask
|
wheel_button_mask
)
self
.
client
.
mouse_event
(
x
,
y
,
button_mask
)
...
...
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