Skip to content

Enable closing a tab by middle click

Bob Bai requested to merge bdbai/okular:master into master

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:

  1. Compile and install.
  2. Enable Open new files in tabs.
  3. Open two documents. They should be opened in two tabs in the same window.
  4. Middle click one of the tabs. It should be closed.
  5. Choose File-Undo close tab. The closed tab should be reopened.
  6. Middle click one of the tabs. It should be closed.
  7. Press Ctrl+Shift+T. The closed tab should be reopened.
Edited by Bob Bai

Merge request reports

Loading