diff --git a/src/calibre/gui2/central.py b/src/calibre/gui2/central.py index 75300b2900..1c75ccb892 100644 --- a/src/calibre/gui2/central.py +++ b/src/calibre/gui2/central.py @@ -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):