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.)

This commit is contained in:
Kovid Goyal 2013-03-10 10:20:14 +05:30
parent 11fb09c535
commit 680376fbbd

View File

@ -328,6 +328,8 @@ class TagBrowserWidget(QWidget): # {{{
search_layout = QHBoxLayout() search_layout = QHBoxLayout()
self._layout.addLayout(search_layout) self._layout.addLayout(search_layout)
self.item_search = HistoryLineEdit(parent) self.item_search = HistoryLineEdit(parent)
self.item_search.setMinimumContentsLength(10)
self.item_search.setSizeAdjustPolicy(self.item_search.AdjustToMinimumContentsLengthWithIcon)
try: try:
self.item_search.lineEdit().setPlaceholderText( self.item_search.lineEdit().setPlaceholderText(
_('Find item in tag browser')) _('Find item in tag browser'))