diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-07 21:23:02 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-07 21:23:02 +0200 |
commit | 441064a8f07436386a4ac2cf688b66124356b2c9 (patch) | |
tree | 7eae48468803c8ac3d604af8e9c497e29ab75b10 /src/gmdocument.c | |
parent | b1d90a9177c68a629cab27e7684edf7df0705719 (diff) |
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.
Diffstat (limited to 'src/gmdocument.c')
-rw-r--r-- | src/gmdocument.c | 9 |
1 files changed, 6 insertions, 3 deletions
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) { | |||
453 | if (!isPreformat || (prevType != preformatted_GmLineType)) { | 453 | if (!isPreformat || (prevType != preformatted_GmLineType)) { |
454 | int required = | 454 | int required = |
455 | iMax(topMargin[type], bottomMargin[prevType]) * lineHeight_Text(paragraph_FontId); | 455 | iMax(topMargin[type], bottomMargin[prevType]) * lineHeight_Text(paragraph_FontId); |
456 | if ((type == link_GmLineType && prevType == link_GmLineType) || | 456 | if (type == link_GmLineType && prevType == link_GmLineType) { |
457 | (type == quote_GmLineType && prevType == quote_GmLineType)) { | 457 | /* Reduced margin between consecutive links. */ |
458 | /* No margin between consecutive links/quote lines. */ | 458 | required *= 0.75f; |
459 | } | ||
460 | if (type == quote_GmLineType && prevType == quote_GmLineType) { | ||
461 | /* No margin between consecutive quote lines. */ | ||
459 | required = 0; | 462 | required = 0; |
460 | } | 463 | } |
461 | if (isEmpty_Array(&d->layout)) { | 464 | if (isEmpty_Array(&d->layout)) { |