summaryrefslogtreecommitdiff
path: root/src/ui/widget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-03-15 22:12:57 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-03-15 22:12:57 +0200
commit71d8274d07a548decdd9065106c9a8fdf50a6f8c (patch)
tree06aa4a80b9f1f1f441f6fddb4fabb7825ad2e698 /src/ui/widget.c
parent65f47b60d521c23f16cb8cbcce6f9e9e3176279a (diff)
Mobile: Find on page, various minor tweaks
On mobile, the search bar appears at the top of the page. Keep the haptic engine running so there is no delay before each effect. After a long-press, remove the "mouse" from the display area so there is no misleading hover. Widget border top/bottom use metrics.
Diffstat (limited to 'src/ui/widget.c')
-rw-r--r--src/ui/widget.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c
index 6a6480e5..8641dd61 100644
--- a/src/ui/widget.c
+++ b/src/ui/widget.c
@@ -871,12 +871,15 @@ void drawBackground_Widget(const iWidget *d) {
871 const iRect rect = bounds_Widget(d); 871 const iRect rect = bounds_Widget(d);
872 iPaint p; 872 iPaint p;
873 init_Paint(&p); 873 init_Paint(&p);
874 const int hgt = gap_UI / 4;
874 if (d->flags & borderTop_WidgetFlag) { 875 if (d->flags & borderTop_WidgetFlag) {
875 drawHLine_Paint(&p, topLeft_Rect(rect), width_Rect(rect), 876 fillRect_Paint(&p, (iRect){ topLeft_Rect(rect),
877 init_I2(width_Rect(rect), hgt) },
876 uiBackgroundFramelessHover_ColorId); 878 uiBackgroundFramelessHover_ColorId);
877 } 879 }
878 if (d->flags & borderBottom_WidgetFlag) { 880 if (d->flags & borderBottom_WidgetFlag) {
879 drawHLine_Paint(&p, addY_I2(bottomLeft_Rect(rect), -1), width_Rect(rect), 881 fillRect_Paint(&p, (iRect) { addY_I2(bottomLeft_Rect(rect), -hgt),
882 init_I2(width_Rect(rect), hgt) },
880 uiBackgroundFramelessHover_ColorId); 883 uiBackgroundFramelessHover_ColorId);
881 } 884 }
882 } 885 }