From 21ffb613eefbc8ba7f402ea97e45b7244295f954 Mon Sep 17 00:00:00 2001 From: yggverse Date: Wed, 11 Dec 2024 08:54:44 +0200 Subject: [PATCH] toggle secondary icon action on entry focus --- .../window/tab/item/page/navigation/request/widget.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/app/browser/window/tab/item/page/navigation/request/widget.rs b/src/app/browser/window/tab/item/page/navigation/request/widget.rs index 5a40a197..2cba71fe 100644 --- a/src/app/browser/window/tab/item/page/navigation/request/widget.rs +++ b/src/app/browser/window/tab/item/page/navigation/request/widget.rs @@ -60,6 +60,14 @@ impl Widget { } }); + entry.connect_has_focus_notify(|this| { + if this.focus_child().is_some_and(|text| text.has_focus()) { + this.set_secondary_icon_name(Some("pan-end-symbolic")); + } else { + this.set_secondary_icon_name(None); + } + }); + entry.connect_changed(move |_| { browser_action.update.activate(None); });