From 6c9914b729a8e020b44018bcc3aa950c8322b313 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Thu, 22 Apr 2021 11:57:08 +0300 Subject: ListWidget: Use SmoothScroll --- src/ui/documentwidget.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/ui/documentwidget.c') diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 1298dda9..853c25a9 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c @@ -3687,19 +3687,15 @@ static void drawMedia_DocumentWidget_(const iDocumentWidget *d, iPaint *p) { static void drawPin_(iPaint *p, iRect rangeRect, int dir) { const int pinColor = tmQuote_ColorId; - const int height = height_Rect(rangeRect); + const int height = height_Rect(rangeRect); iRect pin; if (dir == 0) { - pin = (iRect){ - add_I2(topLeft_Rect(rangeRect), init_I2(-gap_UI / 4, -gap_UI)), - init_I2(gap_UI / 2, height_Rect(rangeRect) + gap_UI) - }; + pin = (iRect){ add_I2(topLeft_Rect(rangeRect), init_I2(-gap_UI / 4, -gap_UI)), + init_I2(gap_UI / 2, height + gap_UI) }; } else { - pin = (iRect){ - addX_I2(topRight_Rect(rangeRect), -gap_UI / 4), - init_I2(gap_UI / 2, height_Rect(rangeRect) + gap_UI) - }; + pin = (iRect){ addX_I2(topRight_Rect(rangeRect), -gap_UI / 4), + init_I2(gap_UI / 2, height + gap_UI) }; } fillRect_Paint(p, pin, pinColor); fillRect_Paint(p, initCentered_Rect(dir == 0 ? topMid_Rect(pin) : bottomMid_Rect(pin), -- cgit v1.2.3