From 441064a8f07436386a4ac2cf688b66124356b2c9 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sun, 7 Mar 2021 21:23:02 +0200 Subject: GmDocument: Adjusted consecutive link spacing It makes link lists more readable to have a bit more space in between, especially if the links get wrapped. --- src/gmdocument.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/gmdocument.c') diff --git a/src/gmdocument.c b/src/gmdocument.c index e518b60c..3eda18d7 100644 --- a/src/gmdocument.c +++ b/src/gmdocument.c @@ -453,9 +453,12 @@ static void doLayout_GmDocument_(iGmDocument *d) { if (!isPreformat || (prevType != preformatted_GmLineType)) { int required = iMax(topMargin[type], bottomMargin[prevType]) * lineHeight_Text(paragraph_FontId); - if ((type == link_GmLineType && prevType == link_GmLineType) || - (type == quote_GmLineType && prevType == quote_GmLineType)) { - /* No margin between consecutive links/quote lines. */ + if (type == link_GmLineType && prevType == link_GmLineType) { + /* Reduced margin between consecutive links. */ + required *= 0.75f; + } + if (type == quote_GmLineType && prevType == quote_GmLineType) { + /* No margin between consecutive quote lines. */ required = 0; } if (isEmpty_Array(&d->layout)) { -- cgit v1.2.3