From ed62171495a1e6a2d83baf3d5ce8b976eea71b2f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 16 May 2021 15:11:09 +0530 Subject: [PATCH] Fix #1928574 [[Enhancement - Edit book] Move clear filter button inside the search field of the Saved searches](https://bugs.launchpad.net/calibre/+bug/1928574) --- src/calibre/gui2/tweak_book/search.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/calibre/gui2/tweak_book/search.py b/src/calibre/gui2/tweak_book/search.py index a5f9e867c0..d726924ee4 100644 --- a/src/calibre/gui2/tweak_book/search.py +++ b/src/calibre/gui2/tweak_book/search.py @@ -885,16 +885,11 @@ class SavedSearches(QWidget): self.l = l = QVBoxLayout(self) self.setLayout(l) - self.h = h = QHBoxLayout() self.filter_text = ft = QLineEdit(self) + ft.setClearButtonEnabled(True) ft.textChanged.connect(self.do_filter) ft.setPlaceholderText(_('Filter displayed searches')) - h.addWidget(ft) - self.cft = cft = QToolButton(self) - cft.setToolTip(_('Clear filter')), cft.setIcon(QIcon(I('clear_left.png'))) - cft.clicked.connect(ft.clear) - h.addWidget(cft) - l.addLayout(h) + l.addWidget(ft) self.h2 = h = QHBoxLayout() self.searches = searches = QListView(self)