--- a/QScintilla/SearchReplaceWidget.py Sun Jan 25 18:45:59 2015 +0100 +++ b/QScintilla/SearchReplaceWidget.py Wed Jan 28 19:38:57 2015 +0100 @@ -9,7 +9,7 @@ from __future__ import unicode_literals -from PyQt5.QtCore import pyqtSignal, Qt, pyqtSlot +from PyQt5.QtCore import pyqtSignal, Qt, pyqtSlot, QEvent from PyQt5.QtWidgets import QWidget, QHBoxLayout, QToolButton, QScrollArea, \ QSizePolicy, QFrame @@ -171,6 +171,19 @@ self.__selections = [] self.__finding = False + def changeEvent(self, evt): + """ + Protected method handling state changes. + + @param evt event containing the state change (QEvent) + """ + if evt.type() == QEvent.FontChange: + self.ensurePolished() + msh = self.minimumSizeHint() + self.resize(max(self.width(), msh.width()), + max(self.height(), msh.height()) + ) + def __selectionBoundary(self, selections=None): """ Private method to calculate the current selection boundary.