Move footer if horisontal scroll bar appears

This commit is contained in:
Veronica K. B. Olsen
2020-08-31 17:37:26 +02:00
parent abd777026e
commit bcd8f94b2c
2 changed files with 14 additions and 2 deletions
+7 -1
View File
@@ -339,6 +339,12 @@ class GuiDocEditor(QTextEdit):
else:
sW = 0
hBar = self.horizontalScrollBar()
if hBar.isVisible():
sH = hBar.height()
else:
sH = 0
if self.mainConf.textFixedW or self.theParent.isFocusMode:
if self.theParent.isFocusMode:
tW = self.mainConf.getFocusWidth()
@@ -354,7 +360,7 @@ class GuiDocEditor(QTextEdit):
tW = wW - 2*tB - sW
tH = self.docHeader.height()
fH = self.docFooter.height()
fY = self.height() - fH - tB
fY = self.height() - fH - tB - sH
self.docHeader.setGeometry(tB, tB, tW, tH)
self.docFooter.setGeometry(tB, fY, tW, fH)