remove template for dock_item
This commit is contained in:
parent
e48f501b0d
commit
71273ec430
16 changed files with 82 additions and 87 deletions
|
|
@ -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 {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue