summaryrefslogtreecommitdiff
path: root/src/ui/documentwidget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-04-22 11:57:08 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-04-22 11:57:08 +0300
commit6c9914b729a8e020b44018bcc3aa950c8322b313 (patch)
tree8e87e140f0882d4aac7efd9ea37141730e5d3837 /src/ui/documentwidget.c
parentc56870ab69b71887d703f51881c26ac79f4b7969 (diff)
ListWidget: Use SmoothScroll
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r--src/ui/documentwidget.c14
1 files changed, 5 insertions, 9 deletions
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) {
3687 3687
3688static void drawPin_(iPaint *p, iRect rangeRect, int dir) { 3688static void drawPin_(iPaint *p, iRect rangeRect, int dir) {
3689 const int pinColor = tmQuote_ColorId; 3689 const int pinColor = tmQuote_ColorId;
3690 const int height = height_Rect(rangeRect); 3690 const int height = height_Rect(rangeRect);
3691 iRect pin; 3691 iRect pin;
3692 if (dir == 0) { 3692 if (dir == 0) {
3693 pin = (iRect){ 3693 pin = (iRect){ add_I2(topLeft_Rect(rangeRect), init_I2(-gap_UI / 4, -gap_UI)),
3694 add_I2(topLeft_Rect(rangeRect), init_I2(-gap_UI / 4, -gap_UI)), 3694 init_I2(gap_UI / 2, height + gap_UI) };
3695 init_I2(gap_UI / 2, height_Rect(rangeRect) + gap_UI)
3696 };
3697 } 3695 }
3698 else { 3696 else {
3699 pin = (iRect){ 3697 pin = (iRect){ addX_I2(topRight_Rect(rangeRect), -gap_UI / 4),
3700 addX_I2(topRight_Rect(rangeRect), -gap_UI / 4), 3698 init_I2(gap_UI / 2, height + gap_UI) };
3701 init_I2(gap_UI / 2, height_Rect(rangeRect) + gap_UI)
3702 };
3703 } 3699 }
3704 fillRect_Paint(p, pin, pinColor); 3700 fillRect_Paint(p, pin, pinColor);
3705 fillRect_Paint(p, initCentered_Rect(dir == 0 ? topMid_Rect(pin) : bottomMid_Rect(pin), 3701 fillRect_Paint(p, initCentered_Rect(dir == 0 ? topMid_Rect(pin) : bottomMid_Rect(pin),