From d846849d3bf2c2fa723f19be5f6ec676851e6600 Mon Sep 17 00:00:00 2001

From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= jaakko.keranen@iki.fi

Date: Fri, 22 Apr 2022 06:45:56 +0300

Subject: [PATCH 1/1] Fixed hovering on links via keyboard

The link info was not updated.


res/about/version.gmi | 1 +

src/ui/documentwidget.c | 17 +++++++++++------

src/ui/labelwidget.c | 10 ++++++++--

3 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/res/about/version.gmi b/res/about/version.gmi

index ab76277b..af4ecd81 100644

--- a/res/about/version.gmi

+++ b/res/about/version.gmi

@@ -8,6 +8,7 @@

1.12.2

+* Fixed hovering on links via the keyboard (default binding: H).

diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c

index f757d4c5..a7920e5d 100644

--- a/src/ui/documentwidget.c

+++ b/src/ui/documentwidget.c

@@ -727,6 +727,15 @@ static void invalidateWideRunsWithNonzeroOffset_DocumentView_(iDocumentView *d)

 }

}

+static void updateHoverLinkInfo_DocumentView_(iDocumentView *d) {

+}

static void updateHover_DocumentView_(iDocumentView *d, iInt2 mouse) {

 const iWidget *w            = constAs_Widget(d->owner);

 const iRect    docBounds    = documentBounds_DocumentView_(d);

@@ -752,12 +761,7 @@ static void updateHover_DocumentView_(iDocumentView *d, iInt2 mouse) {

     if (d->hoverLink) {

         invalidateLink_DocumentView_(d, d->hoverLink->linkId);

     }

     refresh_Widget(w);

 }

 /* Hovering over preformatted blocks. */

@@ -4981,6 +4985,7 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e

                 visibleLinkOrdinal_DocumentView_(view, run->linkId) == ord) {

                 if (d->flags & setHoverViaKeys_DocumentWidgetFlag) {

                     view->hoverLink = run;

                 }

                 else {

                     postCommandf_Root(

diff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c

index 78d38479..aa68225b 100644

--- a/src/ui/labelwidget.c

+++ b/src/ui/labelwidget.c

@@ -244,11 +244,17 @@ static void getColors_LabelWidget_(const iLabelWidget *d, int *bg, int *fg, int

             const enum iGmDocumentTheme docTheme = docTheme_Prefs(prefs_App());

             if (areTabButtonsThemeColored_() &&

                 !cmp_String(&d->widget.parent->id, "tabs.buttons")) {

                            ? tmBackground_ColorId

                            : tmBannerBackground_ColorId);

                 isThemeBackground = iTrue;

             }

             else {

                 *bg = uiBackgroundSelected_ColorId;

--

2.25.1

Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/release/patch/71b3871dfc61b72347574231c03883824662dde3.patch
Status Code
Success (20)
Meta
text/plain
Capsule Response Time
32.330338 milliseconds
Gemini-to-HTML Time
1.79292 milliseconds

This content has been proxied by September (3851b).