Merge branch 'dev' into feature/build_gui
This commit is contained in:
@@ -23,8 +23,6 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
import novelwriter
|
||||
|
||||
from PyQt5.QtGui import QColor, QPalette
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtWidgets import (
|
||||
@@ -32,6 +30,8 @@ from PyQt5.QtWidgets import (
|
||||
QWidget
|
||||
)
|
||||
|
||||
from novelwriter import CONFIG
|
||||
|
||||
|
||||
class NConfigLayout(QGridLayout):
|
||||
|
||||
@@ -44,7 +44,7 @@ class NConfigLayout(QGridLayout):
|
||||
|
||||
self._itemMap = {}
|
||||
|
||||
wSp = novelwriter.CONFIG.pxInt(8)
|
||||
wSp = CONFIG.pxInt(8)
|
||||
self.setHorizontalSpacing(wSp)
|
||||
self.setVerticalSpacing(wSp)
|
||||
self.setColumnStretch(0, 1)
|
||||
@@ -94,7 +94,7 @@ class NConfigLayout(QGridLayout):
|
||||
qLabel = None
|
||||
raise ValueError("theLabel must be a QLabel")
|
||||
|
||||
hM = novelwriter.CONFIG.pxInt(4)
|
||||
hM = CONFIG.pxInt(4)
|
||||
qLabel.setContentsMargins(0, hM, 0, hM)
|
||||
self.addWidget(qLabel, self._nextRow, 0, 1, 2, Qt.AlignLeft)
|
||||
|
||||
@@ -128,7 +128,7 @@ class NConfigLayout(QGridLayout):
|
||||
qWidget = None
|
||||
raise ValueError("theWidget must be a QWidget")
|
||||
|
||||
wSp = novelwriter.CONFIG.pxInt(8)
|
||||
wSp = CONFIG.pxInt(8)
|
||||
qLabel.setIndent(wSp)
|
||||
if helpText is not None:
|
||||
qHelp = NHelpLabel(str(helpText), self._helpCol, self._fontScale)
|
||||
|
||||
@@ -23,14 +23,14 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
import novelwriter
|
||||
|
||||
from PyQt5.QtCore import QRect, QPoint
|
||||
from PyQt5.QtWidgets import (
|
||||
QDialog, QHBoxLayout, QStyle, QStyleOptionTab, QStylePainter, QTabBar,
|
||||
QTabWidget, QVBoxLayout
|
||||
)
|
||||
|
||||
from novelwriter import CONFIG
|
||||
|
||||
|
||||
class NPagedDialog(QDialog):
|
||||
|
||||
@@ -92,7 +92,7 @@ class NVerticalTabBar(QTabBar):
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent=parent)
|
||||
self._mW = novelwriter.CONFIG.pxInt(150)
|
||||
self._mW = CONFIG.pxInt(150)
|
||||
return
|
||||
|
||||
def tabSizeHint(self, index):
|
||||
|
||||
@@ -23,12 +23,11 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
import novelwriter
|
||||
|
||||
from PyQt5.QtGui import QPainter
|
||||
from PyQt5.QtCore import Qt, QRectF, QPropertyAnimation, pyqtProperty
|
||||
from PyQt5.QtWidgets import QSizePolicy, QAbstractButton
|
||||
|
||||
from novelwriter import CONFIG
|
||||
from novelwriter.constants import nwUnicode
|
||||
|
||||
|
||||
@@ -38,18 +37,18 @@ class NSwitch(QAbstractButton):
|
||||
super().__init__(parent=parent)
|
||||
|
||||
if width is None:
|
||||
self._xW = novelwriter.CONFIG.pxInt(40)
|
||||
self._xW = CONFIG.pxInt(40)
|
||||
else:
|
||||
self._xW = width
|
||||
|
||||
if height is None:
|
||||
self._xH = novelwriter.CONFIG.pxInt(20)
|
||||
self._xH = CONFIG.pxInt(20)
|
||||
else:
|
||||
self._xH = height
|
||||
|
||||
self._xR = int(self._xH*0.5)
|
||||
self._xT = int(self._xH*0.6)
|
||||
self._rB = int(novelwriter.CONFIG.guiScale*2)
|
||||
self._rB = int(CONFIG.guiScale*2)
|
||||
self._rH = self._xH - 2*self._rB
|
||||
self._rR = self._xR - self._rB
|
||||
|
||||
|
||||
@@ -23,8 +23,6 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
import novelwriter
|
||||
|
||||
from PyQt5.QtCore import Qt, pyqtSignal
|
||||
from PyQt5.QtWidgets import QGridLayout, QLabel, QScrollArea, QSizePolicy, QWidget
|
||||
|
||||
@@ -38,8 +36,6 @@ class NSwitchBox(QScrollArea):
|
||||
def __init__(self, parent, baseSize):
|
||||
super().__init__(parent=parent)
|
||||
|
||||
self.mainConf = novelwriter.CONFIG
|
||||
|
||||
self._index = 0
|
||||
self._hSwitch = baseSize
|
||||
self._wSwitch = 2*self._hSwitch
|
||||
|
||||
Reference in New Issue
Block a user