summaryrefslogtreecommitdiff
path: root/src/gmdocument.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-07-15 15:13:16 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-07-15 15:13:16 +0300
commit9f7bbeecba762213c7dec4555e0cbb1da2b2ea66 (patch)
treeee25294aac08e2921b3e5514d2d81af08e0df006 /src/gmdocument.c
parent353848947c4de934f0b932d4d3fe97b61f3a1d4a (diff)
RTL line quote and link hover info
Diffstat (limited to 'src/gmdocument.c')
-rw-r--r--src/gmdocument.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gmdocument.c b/src/gmdocument.c
index 5034373d..b403773a 100644
--- a/src/gmdocument.c
+++ b/src/gmdocument.c
@@ -820,7 +820,7 @@ static void doLayout_GmDocument_(iGmDocument *d) {
820 if (!prefs->quoteIcon && type == quote_GmLineType) { 820 if (!prefs->quoteIcon && type == quote_GmLineType) {
821 rts.run.flags |= quoteBorder_GmRunFlag; 821 rts.run.flags |= quoteBorder_GmRunFlag;
822 } 822 }
823 for (;;) { /* may need to retry */ 823 for (;;) { /* need to retry if the font needs changing */
824 rts.run.flags |= startOfLine_GmRunFlag; 824 rts.run.flags |= startOfLine_GmRunFlag;
825 iWrapText wrapText = { .text = line, 825 iWrapText wrapText = { .text = line,
826 .maxWidth = rts.isWordWrapped 826 .maxWidth = rts.isWordWrapped
@@ -841,12 +841,14 @@ static void doLayout_GmDocument_(iGmDocument *d) {
841 prun->visBounds.pos.x += offset; 841 prun->visBounds.pos.x += offset;
842 } 842 }
843 if (type == bullet_GmLineType || type == link_GmLineType || 843 if (type == bullet_GmLineType || type == link_GmLineType ||
844 type == quote_GmLineType) { 844 (type == quote_GmLineType && prefs->quoteIcon)) {
845 iGmRun *decor = back_Array(&d->layout); 845 iGmRun *decor = back_Array(&d->layout);
846 iAssert(decor->flags & decoration_GmRunFlag); 846 iAssert(decor->flags & decoration_GmRunFlag);
847 decor->visBounds.pos.x = d->size.x - width_Rect(decor->visBounds) - 847 decor->visBounds.pos.x = d->size.x - width_Rect(decor->visBounds) -
848 decor->visBounds.pos.x + gap_Text * 848 decor->visBounds.pos.x +
849 (type == bullet_GmLineType ? 1.5f : 1); 849 gap_Text * (type == bullet_GmLineType ? 1.5f
850 : type == quote_GmLineType ? 0.0f
851 : 1.0f);
850 } 852 }
851 } 853 }
852 commit_RunTypesetter_(&rts, d); 854 commit_RunTypesetter_(&rts, d);