This code is not performance critical and the compiler will already inline whatever it thinks it might benefit it.
22 lines
446 B
Rust
22 lines
446 B
Rust
use gtk;
|
|
|
|
#[derive(Debug, Clone)]
|
|
pub struct EmptyView {
|
|
pub container: gtk::Box,
|
|
}
|
|
|
|
impl Default for EmptyView {
|
|
fn default() -> Self {
|
|
let builder = gtk::Builder::new_from_resource("/org/gnome/hammond/gtk/empty_view.ui");
|
|
let view: gtk::Box = builder.get_object("empty_view").unwrap();
|
|
|
|
EmptyView { container: view }
|
|
}
|
|
}
|
|
|
|
impl EmptyView {
|
|
pub fn new() -> EmptyView {
|
|
EmptyView::default()
|
|
}
|
|
}
|