mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
fix focus grab on response area
This commit is contained in:
parent
42e91cdb7c
commit
5d63f49987
4 changed files with 6 additions and 18 deletions
|
|
@ -11,6 +11,7 @@ use widget::Widget;
|
|||
use gtk::{
|
||||
gio::SimpleAction,
|
||||
glib::{uuid_string_random, Uri, UriHideFlags},
|
||||
prelude::WidgetExt,
|
||||
Box,
|
||||
};
|
||||
use std::sync::Arc;
|
||||
|
|
@ -23,7 +24,7 @@ pub struct Default {
|
|||
impl Default {
|
||||
// Construct
|
||||
pub fn new_arc(base: Uri, title: Option<&str>, size_limit: Option<usize>) -> Arc<Self> {
|
||||
// Init local action group
|
||||
// Init local action
|
||||
let action_update = Arc::new(SimpleAction::new(&uuid_string_random(), None));
|
||||
|
||||
// Init components
|
||||
|
|
@ -51,6 +52,8 @@ impl Default {
|
|||
}
|
||||
});
|
||||
|
||||
widget.gobject().connect_realize(move |_| response.focus());
|
||||
|
||||
// Return activated struct
|
||||
Arc::new(Self { widget })
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue