aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/help/helpviewer.h
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2021-01-14 13:21:15 +0100
committerJarek Kobus <jaroslaw.kobus@qt.io>2021-01-19 16:24:04 +0000
commit291f46386fc4432380f96559e5fef66468d48496 (patch)
treeebb06d83926599587295053fb8328aaaac9e072c /src/plugins/help/helpviewer.h
parentaa974e6816b7fc5cdd60b855a2e2b959e07dab23 (diff)
Add "Zoom" setting to the Help font settings
If the scrollWheelZooming is enabled, this setting will get updated when using scroll wheel. It will also be used when zooming in/out by using keyboard shortcuts. Fixes: QTCREATORBUG-25109 Fixes: QTCREATORBUG-25230 Fixes: QTCREATORBUG-23731 Change-Id: I9d22632b4c034ce236fa39dba074df4a2746ff84 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/help/helpviewer.h')
-rw-r--r--src/plugins/help/helpviewer.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/plugins/help/helpviewer.h b/src/plugins/help/helpviewer.h
index b1be6e1dfb..4e0a7f7554 100644
--- a/src/plugins/help/helpviewer.h
+++ b/src/plugins/help/helpviewer.h
@@ -54,9 +54,9 @@ public:
virtual QFont viewerFont() const = 0;
virtual void setViewerFont(const QFont &font) = 0;
- virtual qreal scale() const = 0;
virtual void setScale(qreal scale) = 0;
+ void setFontZoom(int percentage);
void setScrollWheelZoomingEnabled(bool enabled);
bool isScrollWheelZoomingEnabled() const;
@@ -87,9 +87,9 @@ public:
void home();
- virtual void scaleUp() = 0;
- virtual void scaleDown() = 0;
- virtual void resetScale() = 0;
+ void scaleUp();
+ void scaleDown();
+ void resetScale();
virtual void copy() = 0;
virtual void stop() = 0;
virtual void forward() = 0;
@@ -117,6 +117,9 @@ protected:
Actions m_visibleActions;
bool m_scrollWheelZoomingEnabled = true;
int m_loadOverrideStack = 0;
+private:
+ void incrementZoom(int steps);
+ void applyZoom(int percentage);
};
} // namespace Internal