b5f8d6b028
* Update to Gtk-rs 0.14
30 lines
899 B
Rust
30 lines
899 B
Rust
use gtk::prelude::*;
|
|
use gtk::WindowPosition;
|
|
|
|
#[derive(Clone)]
|
|
pub struct GuiAbout {
|
|
pub about_dialog: gtk::AboutDialog,
|
|
|
|
pub button_repository: gtk::Button,
|
|
pub button_donation: gtk::Button,
|
|
pub button_instruction: gtk::Button,
|
|
}
|
|
|
|
impl GuiAbout {
|
|
pub fn create_from_builder(builder: >k::Builder) -> Self {
|
|
let about_dialog: gtk::AboutDialog = builder.object("about_dialog").unwrap();
|
|
about_dialog.set_position(WindowPosition::Center);
|
|
|
|
let button_repository: gtk::Button = builder.object("button_repository").unwrap();
|
|
let button_donation: gtk::Button = builder.object("button_donation").unwrap();
|
|
let button_instruction: gtk::Button = builder.object("button_instruction").unwrap();
|
|
|
|
Self {
|
|
about_dialog,
|
|
button_repository,
|
|
button_donation,
|
|
button_instruction,
|
|
}
|
|
}
|
|
}
|