Use more compact notation
This commit is contained in:
+2
-8
@@ -334,16 +334,10 @@ class GuiDocEditor(QTextEdit):
|
|||||||
cM = self.mainConf.getTextMargin()
|
cM = self.mainConf.getTextMargin()
|
||||||
|
|
||||||
vBar = self.verticalScrollBar()
|
vBar = self.verticalScrollBar()
|
||||||
if vBar.isVisible():
|
sW = vBar.width() if vBar.isVisible() else 0
|
||||||
sW = vBar.width()
|
|
||||||
else:
|
|
||||||
sW = 0
|
|
||||||
|
|
||||||
hBar = self.horizontalScrollBar()
|
hBar = self.horizontalScrollBar()
|
||||||
if hBar.isVisible():
|
sH = hBar.height() if hBar.isVisible() else 0
|
||||||
sH = hBar.height()
|
|
||||||
else:
|
|
||||||
sH = 0
|
|
||||||
|
|
||||||
if self.mainConf.textFixedW or self.theParent.isFocusMode:
|
if self.mainConf.textFixedW or self.theParent.isFocusMode:
|
||||||
if self.theParent.isFocusMode:
|
if self.theParent.isFocusMode:
|
||||||
|
|||||||
+2
-8
@@ -250,16 +250,10 @@ class GuiDocViewer(QTextBrowser):
|
|||||||
just ensure the margins are set correctly.
|
just ensure the margins are set correctly.
|
||||||
"""
|
"""
|
||||||
vBar = self.verticalScrollBar()
|
vBar = self.verticalScrollBar()
|
||||||
if vBar.isVisible():
|
sW = vBar.width() if vBar.isVisible() else 0
|
||||||
sW = vBar.width()
|
|
||||||
else:
|
|
||||||
sW = 0
|
|
||||||
|
|
||||||
hBar = self.horizontalScrollBar()
|
hBar = self.horizontalScrollBar()
|
||||||
if hBar.isVisible():
|
sH = hBar.height() if hBar.isVisible() else 0
|
||||||
sH = hBar.height()
|
|
||||||
else:
|
|
||||||
sH = 0
|
|
||||||
|
|
||||||
cM = self.mainConf.getTextMargin()
|
cM = self.mainConf.getTextMargin()
|
||||||
tB = self.frameWidth()
|
tB = self.frameWidth()
|
||||||
|
|||||||
Reference in New Issue
Block a user