toggle secondary icon action on entry focus

This commit is contained in:
yggverse 2024-12-11 08:54:44 +02:00
parent 315174befb
commit 21ffb613ee

View File

@ -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);
});