Commit Graph

10 Commits

Author SHA1 Message Date
57e9865ace Sort devices by name 2020-10-20 19:36:02 +02:00
aac87621dc Streamline context menus of regular tray application and Plasmoid
* Support triggering actions via the context menu in the regular tray like
  it is already possible in the Plasmoid
* Support copying via the context menu in the Plasmoid like it is already
  possible in the regular tray
* Reduce repetition of coding patterns using templates
2020-10-07 21:42:50 +02:00
13e0732168 Show context menu on recent changes view 2020-01-23 20:07:11 +01:00
6057b2cb2c Map context menu coordinates to top-level widget
Map context menu coordinates to top-level widget if the top-level
widget is a QMenu. Otherwise the context menu is not displayed at
the right position. Not sure why this workaround is required.

The check for QMenu is required. Otherwise the "windowed" mode
enabled via --windowed CLI argument would not work anymore. In
this mode the top-level window is a regular window.

Adding the window flags Qt::Sheet or Qt::Dialog to the QMenu
would help as well but that prevents closing the menu (see
https://github.com/Martchus/syncthingtray/issues/41).
2019-07-31 22:26:11 +02:00
d07bdba5de Add parent to context menus
This is recommended in a Wayland porting guide.
2019-07-31 22:26:00 +02:00
9f9b9124a4 Improve code of dir/dev/download views
* Reduce indentation
* Remove unused #include <QCursor>
* Map context menu position to viewport
* Use const when possible
2019-07-27 11:15:13 +02:00
f4097d3d79 Fix positioning of context menus under Wayland
Does not cover positioning the tray widget itself yet.
2019-07-20 18:56:20 +02:00
69ffaeb1f3 Apply tidy after updating to clang-format 5.0.0
The behavior of clang-format slightly changed in Clang 5.0.0:
http://releases.llvm.org/5.0.0/tools/clang/docs/ReleaseNotes.html#clang-format
2017-09-17 21:48:15 +02:00
732a5fdd8d Apply clang-format 2017-05-01 03:34:43 +02:00
6470038fc7 Refactor to allow sharing backend with other apps
Intended for creating command line tool and plasmoid
2016-09-30 23:58:45 +02:00