From 680376fbbdb2e4d7bb7bf6c6a40059cf6e7e84b5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 10 Mar 2013 10:20:14 +0530 Subject: [PATCH] Fix entering a very long search in the find item in tag browser box causes the tag browser to no longer be shrinkable. Fixes #1152870 (Tag browser part of the window takes almost 75% of the screen, leaving very small display area for book browser. If I drag the partition, the tag browser is lost and the book browser takes full screen. Need to select resize the partitions to suit my browsing requirements.) --- src/calibre/gui2/tag_browser/ui.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/gui2/tag_browser/ui.py b/src/calibre/gui2/tag_browser/ui.py index 913ff8f4a6..ded019c600 100644 --- a/src/calibre/gui2/tag_browser/ui.py +++ b/src/calibre/gui2/tag_browser/ui.py @@ -328,6 +328,8 @@ class TagBrowserWidget(QWidget): # {{{ search_layout = QHBoxLayout() self._layout.addLayout(search_layout) self.item_search = HistoryLineEdit(parent) + self.item_search.setMinimumContentsLength(10) + self.item_search.setSizeAdjustPolicy(self.item_search.AdjustToMinimumContentsLengthWithIcon) try: self.item_search.lineEdit().setPlaceholderText( _('Find item in tag browser'))