mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-12-15 10:01:39 +01:00
feat: Add popup
This commit is contained in:
parent
616792eaad
commit
5575acf00f
3 changed files with 62 additions and 0 deletions
41
src/components/base/popupImpl.rs
Normal file
41
src/components/base/popupImpl.rs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
use adw::subclass::window::AdwWindowImpl;
|
||||
use gtk::subclass::prelude::*;
|
||||
use gtk::{glib, CompositeTemplate};
|
||||
|
||||
use super::popup;
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
#[derive(Default, CompositeTemplate)]
|
||||
#[template(resource = "/org/Xetibo/ReSet/resetPopup.ui")]
|
||||
pub struct Popup {}
|
||||
|
||||
#[glib::object_subclass]
|
||||
impl ObjectSubclass for Popup {
|
||||
const NAME: &'static str = "resetPopup";
|
||||
type Type = popup::Popup;
|
||||
type ParentType = adw::Window;
|
||||
|
||||
fn class_init(klass: &mut Self::Class) {
|
||||
klass.bind_template();
|
||||
}
|
||||
|
||||
fn instance_init(obj: &glib::subclass::InitializingObject<Self>) {
|
||||
obj.init_template();
|
||||
}
|
||||
}
|
||||
|
||||
impl ObjectImpl for Popup {
|
||||
fn constructed(&self) {
|
||||
self.parent_constructed();
|
||||
}
|
||||
}
|
||||
|
||||
impl BoxImpl for Popup {}
|
||||
|
||||
impl WidgetImpl for Popup {}
|
||||
|
||||
impl AdwWindowImpl for Popup {}
|
||||
|
||||
impl WindowImpl for Popup {}
|
||||
|
||||
impl ApplicationWindowImpl for Popup {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue