Tag browser: Fix the find box not using all available width. Fixes #1958490 [Private bug](https://bugs.launchpad.net/calibre/+bug/1958490)

This commit is contained in:
Kovid Goyal 2022-01-20 14:38:26 +05:30
parent 73ffadea06
commit 5d60be4033
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -599,8 +599,8 @@ class TagBrowserBar(QWidget): # {{{
find_shown = self.toggle_search_button.isChecked()
self.toggle_search_button.setVisible(not find_shown)
l = self.layout()
for i in (l.itemAt(i) for i in range(l.count())):
l.removeItem(i)
while l.count():
l.takeAt(0)
if find_shown:
l.addWidget(self.alter_tb)
self.alter_tb.setToolButtonStyle(Qt.ToolButtonStyle.ToolButtonIconOnly)