added about dialog
This commit is contained in:
parent
cafd46ad82
commit
5f692f4651
@ -3,6 +3,7 @@ use futures::executor::block_on;
|
|||||||
use gtk4::prelude::*;
|
use gtk4::prelude::*;
|
||||||
use gtk4::subclass::prelude::*;
|
use gtk4::subclass::prelude::*;
|
||||||
use gtk4::{
|
use gtk4::{
|
||||||
|
AboutDialog,
|
||||||
gdk::Paintable,
|
gdk::Paintable,
|
||||||
glib::*,
|
glib::*,
|
||||||
ApplicationWindow,
|
ApplicationWindow,
|
||||||
@ -11,6 +12,7 @@ use gtk4::{
|
|||||||
Window,
|
Window,
|
||||||
Popover,
|
Popover,
|
||||||
Builder,
|
Builder,
|
||||||
|
License,
|
||||||
IconTheme,
|
IconTheme,
|
||||||
IconLookupFlags,
|
IconLookupFlags,
|
||||||
TextDirection,
|
TextDirection,
|
||||||
@ -45,5 +47,27 @@ impl CustomPopoverMenu {
|
|||||||
self.pop_box.append(&self.subtest_text_view);
|
self.pop_box.append(&self.subtest_text_view);
|
||||||
self.pop_box.set_visible(true);
|
self.pop_box.set_visible(true);
|
||||||
self.popover.set_child(Some(&self.pop_box));
|
self.popover.set_child(Some(&self.pop_box));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn click_about_button(&self,
|
||||||
|
//window: Rc<ApplicationWindow>
|
||||||
|
) {
|
||||||
|
self.test_text_view.connect_clicked(clone!(@strong self as this =>
|
||||||
|
move |_| {
|
||||||
|
let about_dialog = AboutDialog::builder()
|
||||||
|
.program_name("SNESPatcher")
|
||||||
|
.version("0.1.0")
|
||||||
|
.comments("GTK4 app to patch your SNES ROMs!")
|
||||||
|
.authors(["Wyatt J. Miller".to_string()].to_vec())
|
||||||
|
.documenters(["Wyatt J. Miller".to_string()].to_vec())
|
||||||
|
.license_type(License::Mpl20)
|
||||||
|
.website("https://scm.wyattjmiller.com/wymiller/snespatcher")
|
||||||
|
.website_label("Website?")
|
||||||
|
.modal(false)
|
||||||
|
.can_focus(true)
|
||||||
|
//.child(&window)
|
||||||
|
.build();
|
||||||
|
about_dialog.show();
|
||||||
|
}));
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user