diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-10-20 21:48:51 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-10-20 21:48:51 +0300 |
commit | 8a2f5a0cab40986d7af88fc9eae7b3931f30fcc3 (patch) | |
tree | f0a32c0ef839dc34cfddae08b4eb4b930fdb7ecd /src/ui/documentwidget.c | |
parent | 2052acf054291c2915ace9da9cc1a395c3abf832 (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/ui/documentwidget.c')
-rw-r--r-- | src/ui/documentwidget.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 558c320d..8d3716a6 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -1234,6 +1234,10 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd) | |||
1234 | refresh_Widget(w); | 1234 | refresh_Widget(w); |
1235 | updateWindowTitle_DocumentWidget_(d); | 1235 | updateWindowTitle_DocumentWidget_(d); |
1236 | } | 1236 | } |
1237 | else if (equal_Command(cmd, "window.mouse.exited")) { | ||
1238 | updateOutlineOpacity_DocumentWidget_(d); | ||
1239 | return iFalse; | ||
1240 | } | ||
1237 | else if (equal_Command(cmd, "theme.changed") && document_App() == d) { | 1241 | else if (equal_Command(cmd, "theme.changed") && document_App() == d) { |
1238 | updateTheme_DocumentWidget_(d); | 1242 | updateTheme_DocumentWidget_(d); |
1239 | invalidate_DocumentWidget_(d); | 1243 | invalidate_DocumentWidget_(d); |
@@ -2116,7 +2120,6 @@ static void drawRun_DrawContext_(void *context, const iGmRun *run) { | |||
2116 | } | 2120 | } |
2117 | else if (run->audioId) { | 2121 | else if (run->audioId) { |
2118 | /* Audio player UI is drawn afterwards as a dynamic overlay. */ | 2122 | /* Audio player UI is drawn afterwards as a dynamic overlay. */ |
2119 | //fillRect_Paint(&d->paint, moved_Rect(run->visBounds, origin), red_ColorId); | ||
2120 | return; | 2123 | return; |
2121 | } | 2124 | } |
2122 | enum iColorId fg = run->color; | 2125 | enum iColorId fg = run->color; |
@@ -2181,6 +2184,12 @@ static void drawRun_DrawContext_(void *context, const iGmRun *run) { | |||
2181 | goto runDrawn; | 2184 | goto runDrawn; |
2182 | } | 2185 | } |
2183 | } | 2186 | } |
2187 | if (run->flags & quoteBorder_GmRunFlag) { | ||
2188 | drawVLine_Paint(&d->paint, | ||
2189 | addX_I2(visPos, -gap_Text * 5 / 2), | ||
2190 | height_Rect(run->visBounds), | ||
2191 | tmQuoteIcon_ColorId); | ||
2192 | } | ||
2184 | drawRange_Text(run->font, visPos, fg, run->text); | 2193 | drawRange_Text(run->font, visPos, fg, run->text); |
2185 | // printf("{%s}\n", cstr_Rangecc(run->text)); | 2194 | // printf("{%s}\n", cstr_Rangecc(run->text)); |
2186 | runDrawn:; | 2195 | runDrawn:; |