src/eric7/EricWidgets/EricAutoResizeTextBrowser.py

branch
eric7
changeset 11214
8cb6b7651074
parent 11210
dd70d72aac30
equal deleted inserted replaced
11213:2bbdb06da276 11214:8cb6b7651074
52 self.width() - 2 * int(self.document().documentMargin()) 52 self.width() - 2 * int(self.document().documentMargin())
53 ) 53 )
54 54
55 # Get the document height and set it as the fixed height of the text browser. 55 # Get the document height and set it as the fixed height of the text browser.
56 docHeight = self.document().size().height() 56 docHeight = self.document().size().height()
57 self.setFixedHeight(int(docHeight) + ( 57 self.setFixedHeight(
58 self.horizontalScrollBar().height() 58 int(docHeight)
59 if self.horizontalScrollBar().isVisible() 59 + (
60 else 0 60 self.horizontalScrollBar().height()
61 )) 61 if self.horizontalScrollBar().isVisible()
62 else 0
63 )
64 )
62 65
63 # Call the base class updateGeometry() method. 66 # Call the base class updateGeometry() method.
64 super().updateGeometry() 67 super().updateGeometry()

eric ide

mercurial