mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Restrict max size of create catalog dialog to available screen space
This commit is contained in:
parent
8a907cacd9
commit
8561f82898
@ -130,6 +130,10 @@ class Catalog(QDialog, Ui_Dialog):
|
||||
self.restoreGeometry(bytes(geom))
|
||||
else:
|
||||
self.resize(self.sizeHint())
|
||||
d = QCoreApplication.instance().desktop()
|
||||
g = d.availableGeometry(d.screenNumber(self))
|
||||
self.setMaximumWidth(g.width() - 50)
|
||||
self.setMaximumHeight(g.height() - 50)
|
||||
|
||||
def sizeHint(self):
|
||||
desktop = QCoreApplication.instance().desktop()
|
||||
|
Loading…
x
Reference in New Issue
Block a user