mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix very long search strings causing main window to become wider than screen
This commit is contained in:
parent
4978a030d8
commit
470f1aa4c9
@ -507,6 +507,7 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI):
|
||||
self._calculated_available_height = min(max_available_height()-15,
|
||||
self.height())
|
||||
self.resize(self.width(), self._calculated_available_height)
|
||||
self.search.setMaximumWidth(self.width()-150)
|
||||
|
||||
|
||||
if config['autolaunch_server']:
|
||||
@ -523,6 +524,11 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI):
|
||||
self.scheduler.show_dialog)
|
||||
self.location_view.setCurrentIndex(self.location_view.model().index(0))
|
||||
|
||||
def resizeEvent(self, ev):
|
||||
MainWindow.resizeEvent(self, ev)
|
||||
self.search.setMaximumWidth(self.width()-150)
|
||||
|
||||
|
||||
def create_device_menu(self):
|
||||
self._sync_menu = DeviceMenu(self)
|
||||
self.action_sync.setMenu(self._sync_menu)
|
||||
|
@ -192,6 +192,12 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>700</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><p>Search the list of books by title, author, publisher, tags, comments, etc.<br><br>Words separated by spaces are ANDed</string>
|
||||
</property>
|
||||
|
Loading…
x
Reference in New Issue
Block a user