summaryrefslogtreecommitdiff
path: root/src/ui/documentwidget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r--src/ui/documentwidget.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index 4b3c2db0..8ea695d5 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -4597,23 +4597,6 @@ static void drawMedia_DocumentWidget_(const iDocumentWidget *d, iPaint *p) {
4597 } 4597 }
4598} 4598}
4599 4599
4600static void drawPin_(iPaint *p, iRect rangeRect, int dir) {
4601 const int pinColor = tmQuote_ColorId;
4602 const int height = height_Rect(rangeRect);
4603 iRect pin;
4604 if (dir == 0) {
4605 pin = (iRect){ add_I2(topLeft_Rect(rangeRect), init_I2(-gap_UI / 4, -gap_UI)),
4606 init_I2(gap_UI / 2, height + gap_UI) };
4607 }
4608 else {
4609 pin = (iRect){ addX_I2(topRight_Rect(rangeRect), -gap_UI / 4),
4610 init_I2(gap_UI / 2, height + gap_UI) };
4611 }
4612 fillRect_Paint(p, pin, pinColor);
4613 fillRect_Paint(p, initCentered_Rect(dir == 0 ? topMid_Rect(pin) : bottomMid_Rect(pin),
4614 init1_I2(gap_UI * 2)), pinColor);
4615}
4616
4617static void extend_GmRunRange_(iGmRunRange *runs) { 4600static void extend_GmRunRange_(iGmRunRange *runs) {
4618 if (runs->start) { 4601 if (runs->start) {
4619 runs->start--; 4602 runs->start--;
@@ -4857,8 +4840,8 @@ static void draw_DocumentWidget_(const iDocumentWidget *d) {
4857 SDL_SetRenderDrawBlendMode(render, SDL_BLENDMODE_NONE); 4840 SDL_SetRenderDrawBlendMode(render, SDL_BLENDMODE_NONE);
4858 /* Selection range pins. */ 4841 /* Selection range pins. */
4859 if (isTouchSelecting) { 4842 if (isTouchSelecting) {
4860 drawPin_(&ctx.paint, ctx.firstMarkRect, 0); 4843 drawPin_Paint(&ctx.paint, ctx.firstMarkRect, 0, tmQuote_ColorId);
4861 drawPin_(&ctx.paint, ctx.lastMarkRect, 1); 4844 drawPin_Paint(&ctx.paint, ctx.lastMarkRect, 1, tmQuote_ColorId);
4862 } 4845 }
4863 } 4846 }
4864 drawMedia_DocumentWidget_(d, &ctx.paint); 4847 drawMedia_DocumentWidget_(d, &ctx.paint);