mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
toggle secondary icon action on entry focus
This commit is contained in:
parent
315174befb
commit
21ffb613ee
1 changed files with 8 additions and 0 deletions
|
|
@ -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 |_| {
|
entry.connect_changed(move |_| {
|
||||||
browser_action.update.activate(None);
|
browser_action.update.activate(None);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue