mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-07 20:03:45 +02:00
System tray icon: On windows if the calibre window is minimized, fix clicking on the system tray icon not restoring the window. Fixes #1387596 [windows systray-icon behaviour](https://bugs.launchpad.net/calibre/+bug/1387596)
This commit is contained in:
parent
b363d6b5d1
commit
5f0cc490e2
1 changed files with 6 additions and 1 deletions
|
|
@ -498,9 +498,14 @@ def no_op(self, *args):
|
|||
def system_tray_icon_activated(self, r=False):
|
||||
if r in (QSystemTrayIcon.Trigger, QSystemTrayIcon.MiddleClick, False):
|
||||
if self.isVisible():
|
||||
self.hide_windows()
|
||||
if self.isMinimized():
|
||||
self.showNormal()
|
||||
else:
|
||||
self.hide_windows()
|
||||
else:
|
||||
self.show_windows()
|
||||
if self.isMinimized():
|
||||
self.showNormal()
|
||||
|
||||
@property
|
||||
def is_minimized_to_tray(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue