implement some components as traits

This commit is contained in:
yggverse 2025-01-31 22:02:53 +02:00
parent d1c05b6469
commit 1ad3e5006e
8 changed files with 70 additions and 79 deletions

View file

@ -57,9 +57,7 @@ impl Input {
title: Option<&str>,
size_limit: Option<usize>,
) {
self.update(Some(
&Response::build(action, base, title, size_limit).g_box,
));
self.update(Some(&gtk::Box::response(action, base, title, size_limit)));
}
pub fn set_new_sensitive(
@ -69,9 +67,7 @@ impl Input {
title: Option<&str>,
max_length: Option<i32>,
) {
self.update(Some(
&Sensitive::build(action, base, title, max_length).g_box,
));
self.update(Some(&gtk::Box::sensitive(action, base, title, max_length)));
}
pub fn set_new_titan(&self, on_send: impl Fn(&[u8], Box<dyn Fn()>) + 'static) {