diff options
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r-- | src/ui/documentwidget.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 73bd8aaa..64172a08 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -43,6 +43,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ | |||
43 | #include "paint.h" | 43 | #include "paint.h" |
44 | #include "mediaui.h" | 44 | #include "mediaui.h" |
45 | #include "scrollwidget.h" | 45 | #include "scrollwidget.h" |
46 | #include "touch.h" | ||
46 | #include "translation.h" | 47 | #include "translation.h" |
47 | #include "util.h" | 48 | #include "util.h" |
48 | #include "visbuf.h" | 49 | #include "visbuf.h" |
@@ -3103,9 +3104,15 @@ static void drawRun_DrawContext_(void *context, const iGmRun *run) { | |||
3103 | } | 3104 | } |
3104 | enum iColorId fg = run->color; | 3105 | enum iColorId fg = run->color; |
3105 | const iGmDocument *doc = d->widget->doc; | 3106 | const iGmDocument *doc = d->widget->doc; |
3106 | const iBool isHover = | 3107 | iBool isHover = |
3107 | (run->linkId && d->widget->hoverLink && run->linkId == d->widget->hoverLink->linkId && | 3108 | (run->linkId && d->widget->hoverLink && run->linkId == d->widget->hoverLink->linkId && |
3108 | ~run->flags & decoration_GmRunFlag); | 3109 | ~run->flags & decoration_GmRunFlag); |
3110 | /* On mobile, links are not hovered unless a finger is touching. */ | ||
3111 | if (deviceType_App() != desktop_AppDeviceType) { | ||
3112 | if (numFingers_Touch() == 0) { | ||
3113 | isHover = iFalse; | ||
3114 | } | ||
3115 | } | ||
3109 | const iInt2 visPos = addX_I2(add_I2(run->visBounds.pos, origin), | 3116 | const iInt2 visPos = addX_I2(add_I2(run->visBounds.pos, origin), |
3110 | /* Preformatted runs can be scrolled. */ | 3117 | /* Preformatted runs can be scrolled. */ |
3111 | runOffset_DocumentWidget_(d->widget, run)); | 3118 | runOffset_DocumentWidget_(d->widget, run)); |