mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit metadata dialog: Fix incorrect size on multi-screen setup
Edit metadata dialog: The dit metadata dialog currently limits its max size based on the geometry of the smallet attached screen. Change that to use the geometry of the screen on which it will be shown. Fixes #1239597 [metadata window height not remembered](https://bugs.launchpad.net/calibre/+bug/1239597)
This commit is contained in:
parent
78f840906e
commit
c9f5f787b3
@ -753,11 +753,13 @@ class ResizableDialog(QDialog):
|
|||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
QDialog.__init__(self, *args)
|
QDialog.__init__(self, *args)
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
nh, nw = min_available_height()-25, available_width()-10
|
desktop = QCoreApplication.instance().desktop()
|
||||||
|
geom = desktop.availableGeometry(self)
|
||||||
|
nh, nw = geom.height()-25, geom.width()-10
|
||||||
if nh < 0:
|
if nh < 0:
|
||||||
nh = 800
|
nh = max(800, self.height())
|
||||||
if nw < 0:
|
if nw < 0:
|
||||||
nw = 600
|
nw = max(600, self.height())
|
||||||
nh = min(self.height(), nh)
|
nh = min(self.height(), nh)
|
||||||
nw = min(self.width(), nw)
|
nw = min(self.width(), nw)
|
||||||
self.resize(nw, nh)
|
self.resize(nw, nh)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user