diff options
| author | Mike Skec <skec@protonmail.ch> | 2020-12-24 16:32:14 +1100 |
|---|---|---|
| committer | Felix Queißner <felix@ib-queissner.de> | 2020-12-24 09:21:59 +0100 |
| commit | 237d3a8bc9ed6be7196115e0c7b640ca59349b1d (patch) | |
| tree | b038f16f524b409f42a4e4d815b36c5a5630265d /src/browsertab.cpp | |
| parent | eb4b49245ece1bf1e3d04fcd25e6968b482ff285 (diff) | |
| download | kristall-237d3a8bc9ed6be7196115e0c7b640ca59349b1d.tar.gz | |
Add 'view source' to right-click context menu
Diffstat (limited to 'src/browsertab.cpp')
| -rw-r--r-- | src/browsertab.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/browsertab.cpp b/src/browsertab.cpp index 1c9bcd6..e88225b 100644 --- a/src/browsertab.cpp +++ b/src/browsertab.cpp @@ -1192,11 +1192,19 @@ void BrowserTab::on_text_browser_customContextMenuRequested(const QPoint &pos) menu.addSeparator(); QAction * copy = menu.addAction("Copy to clipboard"); - copy->setShortcut(QKeySequence("Ctrl-C")); + copy->setShortcut(QKeySequence("Ctrl+C")); connect(copy, &QAction::triggered, [this]() { this->ui->text_browser->copy(); }); + menu.addSeparator(); + + QAction * viewsrc = menu.addAction("View document source"); + viewsrc->setShortcut(QKeySequence("Ctrl+U")); + connect(viewsrc, &QAction::triggered, [this]() { + mainWindow->viewPageSource(); + }); + menu.exec(ui->text_browser->mapToGlobal(pos)); } |
