Fixed the size of the doc title bar when the scroll bar is present
This commit is contained in:
+8
-6
@@ -314,12 +314,14 @@ class GuiDocEditor(QTextEdit):
|
|||||||
just ensure the margins are set correctly.
|
just ensure the margins are set correctly.
|
||||||
"""
|
"""
|
||||||
cM = self.mainConf.getTextMargin()
|
cM = self.mainConf.getTextMargin()
|
||||||
|
|
||||||
|
vBar = self.verticalScrollBar()
|
||||||
|
if vBar.isVisible():
|
||||||
|
sW = vBar.width()
|
||||||
|
else:
|
||||||
|
sW = 0
|
||||||
|
|
||||||
if self.mainConf.textFixedW or self.theParent.isZenMode:
|
if self.mainConf.textFixedW or self.theParent.isZenMode:
|
||||||
vBar = self.verticalScrollBar()
|
|
||||||
if vBar.isVisible():
|
|
||||||
sW = vBar.width()
|
|
||||||
else:
|
|
||||||
sW = 0
|
|
||||||
if self.theParent.isZenMode:
|
if self.theParent.isZenMode:
|
||||||
tW = self.mainConf.getZenWidth()
|
tW = self.mainConf.getZenWidth()
|
||||||
else:
|
else:
|
||||||
@@ -332,7 +334,7 @@ class GuiDocEditor(QTextEdit):
|
|||||||
tM = cM
|
tM = cM
|
||||||
|
|
||||||
tB = self.lineWidth()
|
tB = self.lineWidth()
|
||||||
tW = self.width() - 2*tB
|
tW = self.width() - 2*tB - sW
|
||||||
tH = self.docTitle.height()
|
tH = self.docTitle.height()
|
||||||
tT = cM - tH
|
tT = cM - tH
|
||||||
self.docTitle.setGeometry(tB, tB, tW, tH)
|
self.docTitle.setGeometry(tB, tB, tW, tH)
|
||||||
|
|||||||
+7
-1
@@ -224,8 +224,14 @@ class GuiDocViewer(QTextBrowser):
|
|||||||
Config.textFixedW is enabled or we're in Zen mode. Otherwise,
|
Config.textFixedW is enabled or we're in Zen mode. Otherwise,
|
||||||
just ensure the margins are set correctly.
|
just ensure the margins are set correctly.
|
||||||
"""
|
"""
|
||||||
|
vBar = self.verticalScrollBar()
|
||||||
|
if vBar.isVisible():
|
||||||
|
sW = vBar.width()
|
||||||
|
else:
|
||||||
|
sW = 0
|
||||||
|
|
||||||
tB = self.lineWidth()
|
tB = self.lineWidth()
|
||||||
tW = self.width() - 2*tB
|
tW = self.width() - 2*tB - sW
|
||||||
tH = self.docTitle.height()
|
tH = self.docTitle.height()
|
||||||
tT = self.mainConf.getTextMargin() - tH
|
tT = self.mainConf.getTextMargin() - tH
|
||||||
self.docTitle.setGeometry(tB, tB, tW, tH)
|
self.docTitle.setGeometry(tB, tB, tW, tH)
|
||||||
|
|||||||
Reference in New Issue
Block a user