mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
306deb01cb
commit
9932dc85d0
@ -37,6 +37,8 @@ class ImageView(QDialog):
|
|||||||
|
|
||||||
def __init__(self, parent, current_img, current_url, geom_name='viewer_image_popup_geometry'):
|
def __init__(self, parent, current_img, current_url, geom_name='viewer_image_popup_geometry'):
|
||||||
QDialog.__init__(self)
|
QDialog.__init__(self)
|
||||||
|
self.setWindowFlag(Qt.WindowMinimizeButtonHint)
|
||||||
|
self.setWindowFlag(Qt.WindowMaximizeButtonHint)
|
||||||
dw = QApplication.instance().desktop()
|
dw = QApplication.instance().desktop()
|
||||||
self.avail_geom = dw.availableGeometry(parent if parent is not None else self)
|
self.avail_geom = dw.availableGeometry(parent if parent is not None else self)
|
||||||
self.current_img = current_img
|
self.current_img = current_img
|
||||||
|
Loading…
x
Reference in New Issue
Block a user