From 948d071fef5afc4935fb98303bb504e1784c36b0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 19 Dec 2016 14:10:37 +0530 Subject: [PATCH] Revert previous change to only render visible widgets Also set expandingDirections to 0 --- src/calibre/gui2/widgets2.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/widgets2.py b/src/calibre/gui2/widgets2.py index 61d0f2f0d9..ffe167937c 100644 --- a/src/calibre/gui2/widgets2.py +++ b/src/calibre/gui2/widgets2.py @@ -345,6 +345,9 @@ class FlowLayout(QLayout): # {{{ QLayout.setGeometry(self, rect) self.do_layout(rect, apply_geometry=True) + def expandingDirections(self): + return Qt.Orientations(0) + def minimumSize(self): size = QSize() for item in self.items: @@ -381,8 +384,6 @@ class FlowLayout(QLayout): # {{{ gmap = {} for item in self.items: isz, wid = item.sizeHint(), item.widget() - if isz.isEmpty() or (wid is not None and not wid.isVisible()): - continue hs, vs = layout_spacing(wid), layout_spacing(wid, False) next_x = x + isz.width() + hs