remove template for dock_item

This commit is contained in:
Ashley Wulber 2021-12-30 17:53:06 -05:00
parent e48f501b0d
commit 71273ec430
16 changed files with 82 additions and 87 deletions

View file

@ -1,15 +1,12 @@
use gtk4::glib;
use gtk4::prelude::*;
use gtk4::subclass::prelude::*;
use gtk4::CompositeTemplate;
use std::cell::RefCell;
use std::rc::Rc;
#[derive(Debug, Default, CompositeTemplate)]
#[template(file = "dock_item.ui")]
#[derive(Debug, Default)]
pub struct DockItem {
#[template_child]
pub image: TemplateChild<gtk4::Image>,
#[template_child]
pub dots: TemplateChild<gtk4::Label>,
pub image: Rc<RefCell<gtk4::Image>>,
pub dots: Rc<RefCell<gtk4::Label>>,
}
#[glib::object_subclass]
@ -17,14 +14,6 @@ impl ObjectSubclass for DockItem {
const NAME: &'static str = "DockItem";
type Type = super::DockItem;
type ParentType = gtk4::Box;
fn class_init(klass: &mut Self::Class) {
Self::bind_template(klass);
}
fn instance_init(obj: &glib::subclass::InitializingObject<Self>) {
obj.init_template();
}
}
impl ObjectImpl for DockItem {}