Skip to content
Snippets Groups Projects
Commit cc2c385b authored by kh's avatar kh
Browse files

Make the documentation font resizable by shortcut.

Task-number: 253365
Reviewed-by: dt
parent 005b0a9a
No related branches found
No related tags found
No related merge requests found
...@@ -52,6 +52,8 @@ ...@@ -52,6 +52,8 @@
#include <coreplugin/sidebar.h> #include <coreplugin/sidebar.h>
#include <coreplugin/welcomemode.h> #include <coreplugin/welcomemode.h>
#include <texteditor/texteditorconstants.h>
#include <QtCore/QDebug> #include <QtCore/QDebug>
#include <QtCore/qplugin.h> #include <QtCore/qplugin.h>
#include <QtCore/QFileInfo> #include <QtCore/QFileInfo>
...@@ -386,6 +388,24 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error) ...@@ -386,6 +388,24 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
QDesktopServices::setUrlHandler("qthelp", this, "openHelpPage"); QDesktopServices::setUrlHandler("qthelp", this, "openHelpPage");
if (Core::ActionContainer *advancedMenu =
am->actionContainer(Core::Constants::M_EDIT_ADVANCED)) {
// reuse TextEditor constants to avoid a second pair of menu actions
QAction *a = new QAction(tr("Increase Font Size"), this);
cmd = am->registerAction(a, TextEditor::Constants::INCREASE_FONT_SIZE,
modecontext);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl++")));
connect(a, SIGNAL(triggered()), m_centralWidget, SLOT(zoomIn()));
advancedMenu->addAction(cmd, Core::Constants::G_EDIT_FONT);
a = new QAction(tr("Decrease Font Size"), this);
cmd = am->registerAction(a, TextEditor::Constants::DECREASE_FONT_SIZE,
modecontext);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+-")));
connect(a, SIGNAL(triggered()), m_centralWidget, SLOT(zoomOut()));
advancedMenu->addAction(cmd, Core::Constants::G_EDIT_FONT);
}
return true; return true;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment