Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graphics
Okular
Commits
c022b054
Commit
c022b054
authored
Aug 31, 2020
by
Laurent Montel
😁
Browse files
Using no deprecated enum Qt::MiddleButton
parent
27ad1bbb
Pipeline
#32498
passed with stage
in 21 minutes and 26 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ui/pageview.cpp
View file @
c022b054
...
...
@@ -1847,7 +1847,7 @@ void PageView::keyPressEvent(QKeyEvent *e)
e
->
accept
();
// if performing a selection or dyn zooming, disable keys handling
if
((
d
->
mouseSelecting
&&
e
->
key
()
!=
Qt
::
Key_Escape
)
||
(
QApplication
::
mouseButtons
()
&
Qt
::
MidButton
))
if
((
d
->
mouseSelecting
&&
e
->
key
()
!=
Qt
::
Key_Escape
)
||
(
QApplication
::
mouseButtons
()
&
Qt
::
Mid
dle
Button
))
return
;
// move/scroll page by using keys
...
...
@@ -1995,7 +1995,7 @@ void PageView::mouseMoveEvent(QMouseEvent *e)
return
;
// if holding mouse mid button, perform zoom
if
(
e
->
buttons
()
&
Qt
::
MidButton
)
{
if
(
e
->
buttons
()
&
Qt
::
Mid
dle
Button
)
{
int
mouseY
=
e
->
globalPos
().
y
();
int
deltaY
=
d
->
mouseMidLastY
-
mouseY
;
...
...
@@ -2139,7 +2139,7 @@ void PageView::mousePressEvent(QMouseEvent *e)
return
;
// if performing a selection or dyn zooming, disable mouse press
if
(
d
->
mouseSelecting
||
(
e
->
button
()
!=
Qt
::
MidButton
&&
(
e
->
buttons
()
&
Qt
::
MidButton
)))
if
(
d
->
mouseSelecting
||
(
e
->
button
()
!=
Qt
::
Mid
dle
Button
&&
(
e
->
buttons
()
&
Qt
::
Mid
dle
Button
)))
return
;
// if the page is scrolling, stop it
...
...
@@ -2149,7 +2149,7 @@ void PageView::mousePressEvent(QMouseEvent *e)
}
// if pressing mid mouse button while not doing other things, begin 'continuous zoom' mode
if
(
e
->
button
()
==
Qt
::
MidButton
)
{
if
(
e
->
button
()
==
Qt
::
Mid
dle
Button
)
{
d
->
mouseMidLastY
=
e
->
globalPos
().
y
();
setCursor
(
Qt
::
SizeVerCursor
);
return
;
...
...
@@ -2362,7 +2362,7 @@ void PageView::mouseReleaseEvent(QMouseEvent *e)
const
QPoint
eventPos
=
contentAreaPoint
(
e
->
pos
());
// handle mode independent mid bottom zoom
if
(
e
->
button
()
==
Qt
::
MidButton
)
{
if
(
e
->
button
()
==
Qt
::
Mid
dle
Button
)
{
// request pixmaps since it was disabled during drag
slotRequestVisiblePixmaps
();
// the cursor may now be over a link.. update it
...
...
Laurent Montel
😁
@mlaurent
mentioned in commit
69776168
·
Aug 31, 2020
mentioned in commit
69776168
mentioned in commit 69776168e2fc8144684fda9c8917dbc583feb906
Toggle commit list
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