summaryrefslogtreecommitdiff
path: root/src/gmdocument.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-10-20 21:48:51 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-10-20 21:48:51 +0300
commit8a2f5a0cab40986d7af88fc9eae7b3931f30fcc3 (patch)
treef0a32c0ef839dc34cfddae08b4eb4b930fdb7ecd /src/gmdocument.c
parent2052acf054291c2915ace9da9cc1a395c3abf832 (diff)
Added quote indicator preference
Also, added a command that gets posted when the mouse exits or enters the window area. This lets the hover outline to be updated accordingly.
Diffstat (limited to 'src/gmdocument.c')
-rw-r--r--src/gmdocument.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gmdocument.c b/src/gmdocument.c
index 7982d57b..f2ac936f 100644
--- a/src/gmdocument.c
+++ b/src/gmdocument.c
@@ -290,7 +290,7 @@ static void doLayout_GmDocument_(iGmDocument *d) {
290 iRangecc contentLine = iNullRange; 290 iRangecc contentLine = iNullRange;
291 iInt2 pos = zero_I2(); 291 iInt2 pos = zero_I2();
292 iBool isFirstText = isGemini && prefs->bigFirstParagraph; 292 iBool isFirstText = isGemini && prefs->bigFirstParagraph;
293 iBool addQuoteIcon = iTrue; 293 iBool addQuoteIcon = prefs->quoteIcon;
294 iBool isPreformat = iFalse; 294 iBool isPreformat = iFalse;
295 iRangecc preAltText = iNullRange; 295 iRangecc preAltText = iNullRange;
296 int preFont = preformatted_FontId; 296 int preFont = preformatted_FontId;
@@ -446,7 +446,7 @@ static void doLayout_GmDocument_(iGmDocument *d) {
446 pushBack_Array(&d->layout, &quoteRun); 446 pushBack_Array(&d->layout, &quoteRun);
447 } 447 }
448 else if (type != quote_GmLineType) { 448 else if (type != quote_GmLineType) {
449 addQuoteIcon = iTrue; 449 addQuoteIcon = prefs->quoteIcon;
450 } 450 }
451 /* Link icon. */ 451 /* Link icon. */
452 if (type == link_GmLineType) { 452 if (type == link_GmLineType) {
@@ -485,6 +485,9 @@ static void doLayout_GmDocument_(iGmDocument *d) {
485 iRangecc runLine = line; 485 iRangecc runLine = line;
486 /* Create one or more text runs for this line. */ 486 /* Create one or more text runs for this line. */
487 run.flags |= startOfLine_GmRunFlag; 487 run.flags |= startOfLine_GmRunFlag;
488 if (!prefs->quoteIcon && type == quote_GmLineType) {
489 run.flags |= quoteBorder_GmRunFlag;
490 }
488 iAssert(!isEmpty_Range(&runLine)); /* must have something at this point */ 491 iAssert(!isEmpty_Range(&runLine)); /* must have something at this point */
489 while (!isEmpty_Range(&runLine)) { 492 while (!isEmpty_Range(&runLine)) {
490 /* Little bit of breathing space between wrapped lines. */ 493 /* Little bit of breathing space between wrapped lines. */
@@ -835,7 +838,7 @@ void setThemeSeed_GmDocument(iGmDocument *d, const iBlock *seed) {
835 violet_Hue, 838 violet_Hue,
836 pink_Hue 839 pink_Hue
837 }; 840 };
838 static const float hues[] = { 5, 25, 40, 56, 80, 120, 160, 180, 208, 231, 270, 324 }; 841 static const float hues[] = { 5, 25, 40, 56, 80, 120, 160, 180, 208, 231, 270, 324 };
839 static const struct { 842 static const struct {
840 int index[2]; 843 int index[2];
841 } altHues[iElemCount(hues)] = { 844 } altHues[iElemCount(hues)] = {