Skip to content

Commit

Permalink
Added right click menu action for TTS
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaopengLin committed Sep 20, 2024
1 parent e3ab17b commit 91e0210
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/webview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,12 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
} else {
menu = createLinkContextMenu();
}

auto app = KiwixApp::instance();
if (page()->hasSelection())
menu->addAction(app->getAction(KiwixApp::ReadTextAction));
menu->addAction(app->getAction(KiwixApp::ReadArticleAction));

menu->exec(event->globalPos());
}

Expand Down

0 comments on commit 91e0210

Please sign in to comment.