From 7cdf57969cdf21dc25fd65538030125286c4dee5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 12 Apr 2010 23:49:32 +0530 Subject: [PATCH] Fix #5285 (installed new version 6.47 and program window is wrong) --- src/calibre/gui2/search_box.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/calibre/gui2/search_box.py b/src/calibre/gui2/search_box.py index bbffbc4243..033b43954a 100644 --- a/src/calibre/gui2/search_box.py +++ b/src/calibre/gui2/search_box.py @@ -71,6 +71,8 @@ class SearchBox2(QComboBox): self.timer = None self.setInsertPolicy(self.NoInsert) self.setMaxCount(self.MAX_COUNT) + self.setSizeAdjustPolicy(self.AdjustToMinimumContentsLengthWithIcon) + self.setMinimumContentsLength(50) def initialize(self, opt_name, colorize=False, help_text=_('Search')): @@ -212,6 +214,8 @@ class SavedSearchBox(QComboBox): self.help_state = True self.prev_search = '' self.setInsertPolicy(self.NoInsert) + self.setSizeAdjustPolicy(self.AdjustToMinimumContentsLengthWithIcon) + self.setMinimumContentsLength(10) def initialize(self, _saved_searches, _search_box, colorize=False, help_text=_('Search')): self.tool_tip_text = self.toolTip()