refactor: rename app_library application row to app_item

This commit is contained in:
Ashley Wulber 2021-12-02 12:56:57 -05:00
parent b23ec4976f
commit 6484f886ed
5 changed files with 18 additions and 22 deletions

View file

@ -0,0 +1,34 @@
use gtk::glib;
use gtk::prelude::*;
use gtk::subclass::prelude::*;
use gtk4 as gtk;
use gtk::CompositeTemplate;
#[derive(Debug, Default, CompositeTemplate)]
#[template(file = "app_item.ui")]
pub struct AppItem {
#[template_child]
pub name: TemplateChild<gtk::Label>,
#[template_child]
pub image: TemplateChild<gtk::Image>,
}
#[glib::object_subclass]
impl ObjectSubclass for AppItem {
const NAME: &'static str = "AppItem";
type Type = super::AppItem;
type ParentType = gtk::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 AppItem {}
impl WidgetImpl for AppItem {}
impl BoxImpl for AppItem {}