Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Systray icon: Always toggle visibility when clicking & Add "Show/Hide" menu entry #149

Merged
merged 2 commits into from
Feb 23, 2020

Conversation

fbriere
Copy link
Collaborator

@fbriere fbriere commented Jul 3, 2019

This addresses both halves of issue #121 by:

  • Fixing a bug where if "Hide in system tray when closing main window" was disabled, clicking on the system tray icon would not toggle visibility of the main window.
  • Adding a "Show/Hide window" entry to the system tray icon menu.

Closes #121

Left-clicking on the system tray icon should always result in toggling
the visibility of the main window; if the icon is visible and clickble,
then the window can always be hidden via --hide, or on startup via the
"Startup hidden in system tray" option.  (In the latter case, this
previously resulted in a hidden and inaccessible window, as reported in
issue LubosD#121.)
It's customary for applications embedding themselves in the system tray
to offer a "Show/Hide window" menu entry on right-click, even for those
applications which offer the same functionality via a single left-click.

(Thanks to qBittorrent for the idea of using QMenu::aboutToShow to
update the label of this menu entry.)
@fbriere fbriere added bug enhancement pending A pull request closing this issue has been submitted and removed pending A pull request closing this issue has been submitted labels Jul 6, 2019
@fbriere fbriere added the GUI label Sep 26, 2019
@LubosD LubosD merged commit a25b22b into LubosD:master Feb 23, 2020
@fbriere fbriere deleted the issue/121-toggle-window-menu-entry branch March 21, 2020 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to restore minimized main window
2 participants