Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
KDE Pim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Unmaintained
KDE Pim
Commits
2c627bf8
Commit
2c627bf8
authored
May 23, 2016
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow to change zoom with wheel
parent
678c22f0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
akregator/src/actions/actionmanager.h
akregator/src/actions/actionmanager.h
+7
-0
akregator/src/actions/actionmanagerimpl.h
akregator/src/actions/actionmanagerimpl.h
+1
-1
akregator/src/articleviewer-ng/webengine/articleviewerwebengine.cpp
...src/articleviewer-ng/webengine/articleviewerwebengine.cpp
+11
-0
No files found.
akregator/src/actions/actionmanager.h
View file @
2c627bf8
...
...
@@ -33,6 +33,11 @@ class QAction;
class
QWidget
;
namespace
WebEngineViewer
{
class
ZoomActionMenu
;
}
namespace
Akregator
{
...
...
@@ -57,6 +62,8 @@ public:
virtual
QAction
*
action
(
const
QString
&
name
)
=
0
;
virtual
QWidget
*
container
(
const
QString
&
name
)
=
0
;
virtual
WebEngineViewer
::
ZoomActionMenu
*
zoomActionMenu
()
const
=
0
;
virtual
void
setArticleActionsEnabled
(
bool
enabled
)
=
0
;
private:
...
...
akregator/src/actions/actionmanagerimpl.h
View file @
2c627bf8
...
...
@@ -71,7 +71,7 @@ public:
void
setArticleActionsEnabled
(
bool
enabled
)
Q_DECL_OVERRIDE
;
void
setTrayIcon
(
TrayIcon
*
trayIcon
);
KActionCollection
*
actionCollection
()
const
;
WebEngineViewer
::
ZoomActionMenu
*
zoomActionMenu
()
const
;
WebEngineViewer
::
ZoomActionMenu
*
zoomActionMenu
()
const
Q_DECL_OVERRIDE
;
QString
quickSearchLineText
()
const
;
public
Q_SLOTS
:
...
...
akregator/src/articleviewer-ng/webengine/articleviewerwebengine.cpp
View file @
2c627bf8
...
...
@@ -19,6 +19,7 @@
#include "akregator_debug.h"
#include "articleviewerwebenginepage.h"
#include "webengine/urlhandlerwebenginemanager.h"
#include <WebEngineViewer/ZoomActionMenu>
#include "actionmanager.h"
#include "akregatorconfig.h"
#include "actions/actions.h"
...
...
@@ -348,6 +349,16 @@ void ArticleViewerWebEngine::forwardWheelEvent(QWheelEvent *e)
if
(
Settings
::
self
()
->
accessKeyEnabled
())
{
mWebEngineViewAccessKey
->
wheelEvent
(
e
);
}
if
(
QApplication
::
keyboardModifiers
()
&
Qt
::
ControlModifier
)
{
const
int
numDegrees
=
e
->
delta
()
/
8
;
const
int
numSteps
=
numDegrees
/
15
;
const
qreal
factor
=
ActionManager
::
getInstance
()
->
zoomActionMenu
()
->
zoomFactor
()
+
numSteps
*
10
;
if
(
factor
>=
10
&&
factor
<=
300
)
{
ActionManager
::
getInstance
()
->
zoomActionMenu
()
->
setZoomFactor
(
factor
);
ActionManager
::
getInstance
()
->
zoomActionMenu
()
->
setWebViewerZoomFactor
(
factor
/
100.0
);
}
e
->
accept
();
}
}
void
ArticleViewerWebEngine
::
resizeEvent
(
QResizeEvent
*
e
)
...
...
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