Viewer image popups: Allow maximizing/minimizing the window. Fixes #1899762 [Minimize button in image viewer [Enhancement]](https://bugs.launchpad.net/calibre/+bug/1899762)

This commit is contained in:
Kovid Goyal 2020-10-14 18:11:33 +05:30
parent 306deb01cb
commit 9932dc85d0
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -37,6 +37,8 @@ class ImageView(QDialog):
def __init__(self, parent, current_img, current_url, geom_name='viewer_image_popup_geometry'):
QDialog.__init__(self)
self.setWindowFlag(Qt.WindowMinimizeButtonHint)
self.setWindowFlag(Qt.WindowMaximizeButtonHint)
dw = QApplication.instance().desktop()
self.avail_geom = dw.availableGeometry(parent if parent is not None else self)
self.current_img = current_img