Standardise text sizes and margins

This commit is contained in:
Veronica Berglyd Olsen
2024-10-17 22:34:46 +02:00
parent 912198cc40
commit d145b65237
21 changed files with 164 additions and 146 deletions
+15 -17
View File
@@ -36,7 +36,7 @@ from PyQt5.QtCore import QT_TRANSLATE_NOOP, QCoreApplication
from novelwriter import CONFIG
from novelwriter.common import checkUuid, isHandle, jsonEncode
from novelwriter.constants import nwFiles, nwHeadFmt
from novelwriter.constants import nwFiles, nwHeadFmt, nwStyles
from novelwriter.core.project import NWProject
from novelwriter.enum import nwBuildFmt
from novelwriter.error import logException
@@ -87,20 +87,20 @@ SETTINGS_TEMPLATE: dict[str, tuple[type, str | int | float | bool]] = {
"format.firstLineIndent": (bool, False),
"format.firstIndentWidth": (float, 1.4),
"format.indentFirstPar": (bool, False),
"format.titleMarginT": (float, 1.42),
"format.titleMarginB": (float, 0.50),
"format.h1MarginT": (float, 1.42),
"format.h1MarginB": (float, 0.50),
"format.h2MarginT": (float, 1.67),
"format.h2MarginB": (float, 0.50),
"format.h3MarginT": (float, 1.17),
"format.h3MarginB": (float, 0.50),
"format.h4MarginT": (float, 1.17),
"format.h4MarginB": (float, 0.50),
"format.textMarginT": (float, 0.00),
"format.textMarginB": (float, 0.50),
"format.sepMarginT": (float, 1.17),
"format.sepMarginB": (float, 1.17),
"format.titleMarginT": (float, nwStyles.T_MARGIN["H0"][0]),
"format.titleMarginB": (float, nwStyles.T_MARGIN["H0"][1]),
"format.h1MarginT": (float, nwStyles.T_MARGIN["H1"][0]),
"format.h1MarginB": (float, nwStyles.T_MARGIN["H1"][1]),
"format.h2MarginT": (float, nwStyles.T_MARGIN["H2"][0]),
"format.h2MarginB": (float, nwStyles.T_MARGIN["H2"][1]),
"format.h3MarginT": (float, nwStyles.T_MARGIN["H3"][0]),
"format.h3MarginB": (float, nwStyles.T_MARGIN["H3"][1]),
"format.h4MarginT": (float, nwStyles.T_MARGIN["H4"][0]),
"format.h4MarginB": (float, nwStyles.T_MARGIN["H4"][1]),
"format.textMarginT": (float, nwStyles.T_MARGIN["TT"][0]),
"format.textMarginB": (float, nwStyles.T_MARGIN["TT"][1]),
"format.sepMarginT": (float, nwStyles.T_MARGIN["SP"][0]),
"format.sepMarginB": (float, nwStyles.T_MARGIN["SP"][1]),
"format.pageUnit": (str, "cm"),
"format.pageSize": (str, "A4"),
"format.pageWidth": (float, 21.0),
@@ -159,8 +159,6 @@ SETTINGS_LABELS = {
"format.indentFirstPar": QT_TRANSLATE_NOOP("Builds", "Indent First Paragraph"),
"format.grpMargins": QT_TRANSLATE_NOOP("Builds", "Text Margins"),
"format.textMargin": QT_TRANSLATE_NOOP("Builds", "Text Paragraph"),
"format.sepMargin": QT_TRANSLATE_NOOP("Builds", "Scene Separator"),
"format.grpPage": QT_TRANSLATE_NOOP("Builds", "Page Layout"),
"format.pageUnit": QT_TRANSLATE_NOOP("Builds", "Unit"),