Enable closing a tab by middle click
In some applications like Chromium or Dolphin, it is possible to use middle click to close a tab. This patch brings the similar user experience to Okular.
Some discussions at https://phabricator.kde.org/D25484 .
This MR adds:
- mouse middle button event handler for closing a tab
- an
undo close tab
action
Test plan:
- Compile and install.
- Enable
Open new files in tabs
. - Open two documents. They should be opened in two tabs in the same window.
- Middle click one of the tabs. It should be closed.
- Choose
File
-Undo close tab
. The closed tab should be reopened. - Middle click one of the tabs. It should be closed.
- Press Ctrl+Shift+T. The closed tab should be reopened.
Edited by Bob Bai