mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-02-05 07:54:14 +00:00
grab focus on set
This commit is contained in:
parent
179cad9a57
commit
d1c8afd83f
@ -11,7 +11,7 @@ pub struct Widget {
|
||||
impl Widget {
|
||||
// Construct
|
||||
pub fn new_arc() -> Arc<Self> {
|
||||
let gobject = Entry::builder().hexpand(true).build();
|
||||
let gobject = Entry::builder().editable(true).hexpand(true).build();
|
||||
|
||||
Arc::new(Self { gobject })
|
||||
}
|
||||
@ -20,7 +20,8 @@ impl Widget {
|
||||
pub fn set(&self, placeholder_text: &str, sensitive: bool) {
|
||||
self.gobject.set_text(&""); // reset
|
||||
self.gobject.set_placeholder_text(Some(placeholder_text));
|
||||
self.gobject.set_sensitive(sensitive);
|
||||
// self.gobject.set_sensitive(sensitive);
|
||||
self.gobject.grab_focus();
|
||||
}
|
||||
|
||||
// Getters
|
||||
|
Loading…
x
Reference in New Issue
Block a user