mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Use main window aspect ratio for narrow layout decision on cover browser position
This commit is contained in:
parent
b501bce746
commit
40f3e15a18
@ -367,7 +367,10 @@ class CentralContainer(QWidget):
|
||||
|
||||
@property
|
||||
def narrow_cb_on_top(self):
|
||||
return self.width() / self.height() <= 1.4
|
||||
from calibre.gui2.ui import get_gui
|
||||
gui = get_gui()
|
||||
ratio = self.width() / self.height() if gui is None else gui.width() / gui.height()
|
||||
return ratio <= 1.4
|
||||
|
||||
@property
|
||||
def is_visible(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user