From bbe0f42bb1534648ca99b8928b45ff7f8f964032 Mon Sep 17 00:00:00 2001
From: doryan <sagiev2015@yandex.ru>
Date: Fri, 16 Aug 2024 23:23:39 +0400
Subject: [PATCH] feat(fn): add about dialogue window component

---
 src/view/components/about.rs | 19 +++++++++++++++++++
 src/view/components/mod.rs   |  1 +
 2 files changed, 20 insertions(+)
 create mode 100644 src/view/components/about.rs

diff --git a/src/view/components/about.rs b/src/view/components/about.rs
new file mode 100644
index 0000000..4143899
--- /dev/null
+++ b/src/view/components/about.rs
@@ -0,0 +1,19 @@
+use gio::{glib::Variant, SimpleAction};
+use gtk4 as gtk;
+
+use gtk::{prelude::GtkWindowExt, AboutDialog, Image};
+
+use std::path::Path;
+
+pub fn open_about_dialogue(_action: &SimpleAction, _var: Option<&Variant>) {
+    let logo = Image::from_file(Path::new("./src/view/resources/logo.png"))
+        .paintable()
+        .unwrap();
+    AboutDialog::builder()
+        .authors(vec!["Сагиев А.Д.", "Ефимов И.П."])
+        .version("1.0-beta")
+        .logo(&logo)
+        .website("https://gitea.doryan04.ru/doryan/AIT")
+        .build()
+        .present();
+}
diff --git a/src/view/components/mod.rs b/src/view/components/mod.rs
index 3c345bd..185868e 100644
--- a/src/view/components/mod.rs
+++ b/src/view/components/mod.rs
@@ -1,3 +1,4 @@
+pub mod about;
 pub mod info_bar;
 pub mod input;
 pub mod menu;