diff options
| author | Mike Skec <skec@protonmail.ch> | 2021-02-13 13:57:35 +1100 |
|---|---|---|
| committer | Felix Queißner <felix@ib-queissner.de> | 2021-02-13 12:32:26 +0100 |
| commit | 19ac43503568ebc7fe4721f84292a11bbf7c2c2c (patch) | |
| tree | 4feaa078c614476ed0a4165da6eab5a1a1ca39bb /src/documentstyle.cpp | |
| parent | 496ea48de41e6c637c9fb3582216dbd9d8ee55c7 (diff) | |
| download | kristall-19ac43503568ebc7fe4721f84292a11bbf7c2c2c.tar.gz | |
Adds per-style pref for text width
Diffstat (limited to 'src/documentstyle.cpp')
| -rw-r--r-- | src/documentstyle.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/documentstyle.cpp b/src/documentstyle.cpp index e6642a2..3bfd857 100644 --- a/src/documentstyle.cpp +++ b/src/documentstyle.cpp @@ -135,11 +135,13 @@ DocumentStyle::DocumentStyle(bool do_init) : theme(Fixed), internal_link_prefix("→ "), external_link_prefix("⇒ "), margin(55.0), + text_width(900), ansi_colors({"black", "darkred", "darkgreen", "darkgoldenrod", "darkblue", "darkmagenta", "darkcyan", "lightgray", "gray", "red", "green", "goldenrod", "lightblue", "magenta", "cyan", "white"}), justify_text(true), + text_width_enabled(true), line_height_p(5.0), line_height_h(0.0), indent_bq(2), indent_p(1), indent_h(0), indent_l(2) @@ -273,6 +275,8 @@ bool DocumentStyle::save(QSettings &settings) const settings.beginGroup("Formatting"); settings.setValue("justify_text", justify_text); + settings.setValue("text_width_enabled", text_width_enabled); + settings.setValue("text_width", text_width); settings.setValue("line_height_p", line_height_p); settings.setValue("line_height_h", line_height_h); settings.setValue("indent_bq", indent_bq); @@ -378,6 +382,8 @@ bool DocumentStyle::load(QSettings &settings) settings.beginGroup("Formatting"); justify_text = settings.value("justify_text", justify_text).toBool(); + text_width_enabled = settings.value("text_width_enabled", text_width_enabled).toBool(); + text_width = settings.value("text_width", text_width).toInt(); line_height_p = settings.value("line_height_p", line_height_p).toDouble(); line_height_h = settings.value("line_height_h", line_height_h).toDouble(); indent_bq = settings.value("indent_bq", indent_bq).toInt(); |
