remove templates for app_library and cleanup window styling

This commit is contained in:
Ashley Wulber 2021-12-31 16:03:47 -05:00
parent 7c0cf048ee
commit 346701b16d
15 changed files with 185 additions and 256 deletions

View file

@ -1,17 +1,14 @@
use std::cell::Cell;
use std::cell::RefCell;
use std::rc::Rc;
use gtk4::glib;
use gtk4::prelude::*;
use glib;
use gtk4::subclass::prelude::*;
use gtk4::CompositeTemplate;
#[derive(Debug, Default, CompositeTemplate)]
#[template(file = "grid_item.ui")]
#[derive(Debug, Default)]
pub struct GridItem {
#[template_child]
pub name: TemplateChild<gtk4::Label>,
#[template_child]
pub image: TemplateChild<gtk4::Image>,
pub name: Rc<RefCell<gtk4::Label>>,
pub image: Rc<RefCell<gtk4::Image>>,
pub index: Cell<u32>,
}
@ -20,14 +17,6 @@ impl ObjectSubclass for GridItem {
const NAME: &'static str = "GridItem";
type Type = super::GridItem;
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 GridItem {}