feat(imports): update imports
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
use gtk4 as gtk;
|
||||
use gio::glib::clone;
|
||||
|
||||
use std::{collections::VecDeque, sync::LazyLock};
|
||||
|
||||
use gtk::{
|
||||
builders::{BoxBuilder, ButtonBuilder, LabelBuilder},
|
||||
prelude::{BoxExt, ButtonExt, ObjectExt, WidgetExt},
|
||||
Box, Button, Label, Revealer, RevealerTransitionType,
|
||||
Box, Button, Label, Revealer, RevealerTransitionType
|
||||
};
|
||||
|
||||
use crate::model::builder_traits::Product;
|
||||
@@ -94,20 +94,20 @@ impl InfoBarBuilder {
|
||||
|
||||
info_bar_box.append(&info_bar_label);
|
||||
info_bar_box.append(&info_bar_close_btn);
|
||||
info_bar_box.set_widget_name("info_bar");
|
||||
|
||||
let info_bar: &Revealer = &INFO_BAR_INSTANCE.instance;
|
||||
|
||||
info_bar.set_transition_type(RevealerTransitionType::SlideUp);
|
||||
info_bar.set_transition_duration(200);
|
||||
|
||||
info_bar.set_child(Some(&info_bar_box));
|
||||
info_bar.set_widget_name("infobar");
|
||||
info_bar.set_css_classes(&[".warning"]);
|
||||
|
||||
let info_bar_to_close = info_bar.clone();
|
||||
|
||||
info_bar_close_btn.connect_clicked(move |_| {
|
||||
info_bar_to_close.set_reveal_child(false);
|
||||
});
|
||||
info_bar_close_btn.connect_clicked(clone!(
|
||||
#[strong]
|
||||
info_bar,
|
||||
move |_| info_bar.set_reveal_child(false)
|
||||
));
|
||||
|
||||
&INFO_BAR_INSTANCE
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user