mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04: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
@ -498,9 +498,14 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{
|
||||
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…
x
Reference in New Issue
Block a user