diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2022-02-07 22:43:57 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2022-02-07 22:43:57 +0200 |
commit | 8b4dbac197dd630cd58af9cd34aaeb15e7584c29 (patch) | |
tree | 624f5cccec4979f7d6309cb6e339b45e4ed331ef /src | |
parent | e3c5cd103a8b78d41b4c7b8be8e913e7be2820c0 (diff) |
DocumentWidget: No link number for image caption
Diffstat (limited to 'src')
-rw-r--r-- | src/gmdocument.c | 2 | ||||
-rw-r--r-- | src/gmdocument.h | 1 | ||||
-rw-r--r-- | src/ui/documentwidget.c | 3 |
3 files changed, 4 insertions, 2 deletions
diff --git a/src/gmdocument.c b/src/gmdocument.c index b5e71e21..6fa275a8 100644 --- a/src/gmdocument.c +++ b/src/gmdocument.c | |||
@@ -1093,7 +1093,7 @@ static void doLayout_GmDocument_(iGmDocument *d) { | |||
1093 | /* Image metadata caption. */ { | 1093 | /* Image metadata caption. */ { |
1094 | run.font = FONT_ID(documentBody_FontId, semiBold_FontStyle, contentSmall_FontSize); | 1094 | run.font = FONT_ID(documentBody_FontId, semiBold_FontStyle, contentSmall_FontSize); |
1095 | run.color = tmQuoteIcon_ColorId; | 1095 | run.color = tmQuoteIcon_ColorId; |
1096 | run.flags = decoration_GmRunFlag; | 1096 | run.flags = decoration_GmRunFlag | caption_GmRunFlag; |
1097 | run.mediaId = 0; | 1097 | run.mediaId = 0; |
1098 | run.mediaType = 0; | 1098 | run.mediaType = 0; |
1099 | run.visBounds.pos.y = pos.y; | 1099 | run.visBounds.pos.y = pos.y; |
diff --git a/src/gmdocument.h b/src/gmdocument.h index eb02a26c..37b99c68 100644 --- a/src/gmdocument.h +++ b/src/gmdocument.h | |||
@@ -122,6 +122,7 @@ enum iGmRunFlags { | |||
122 | endOfLine_GmRunFlag = iBit(3), | 122 | endOfLine_GmRunFlag = iBit(3), |
123 | quoteBorder_GmRunFlag = iBit(5), | 123 | quoteBorder_GmRunFlag = iBit(5), |
124 | wide_GmRunFlag = iBit(6), /* horizontally scrollable */ | 124 | wide_GmRunFlag = iBit(6), /* horizontally scrollable */ |
125 | caption_GmRunFlag = iBit(7), | ||
125 | altText_GmRunFlag = iBit(8), | 126 | altText_GmRunFlag = iBit(8), |
126 | }; | 127 | }; |
127 | 128 | ||
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 03d430cb..7a1cdabc 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -1332,7 +1332,8 @@ static void drawRun_DrawContext_(void *context, const iGmRun *run) { | |||
1332 | run->text); | 1332 | run->text); |
1333 | } | 1333 | } |
1334 | else { | 1334 | else { |
1335 | if (d->showLinkNumbers && run->linkId && run->flags & decoration_GmRunFlag) { | 1335 | if (d->showLinkNumbers && run->linkId && run->flags & decoration_GmRunFlag && |
1336 | ~run->flags & caption_GmRunFlag) { | ||
1336 | const size_t ord = visibleLinkOrdinal_DocumentView_(d->view, run->linkId); | 1337 | const size_t ord = visibleLinkOrdinal_DocumentView_(d->view, run->linkId); |
1337 | if (ord >= d->view->owner->ordinalBase) { | 1338 | if (ord >= d->view->owner->ordinalBase) { |
1338 | const iChar ordChar = | 1339 | const iChar ordChar = |