fix(path): add paths for debug and release profiles

This commit is contained in:
doryan 2024-08-17 21:51:09 +04:00
parent 17098e6e88
commit 21bc19e893

View File

@ -11,10 +11,14 @@ use std::path::Path;
use crate::view::properties::Setters; use crate::view::properties::Setters;
#[cfg(debug_assertions)]
const PATH: &str = "./src/view/resources/logo.png";
#[cfg(not(debug_assertions))]
const PATH: &str = "./resources/logo.png";
pub fn open_about_dialogue(_action: &SimpleAction, _var: Option<&Variant>) { pub fn open_about_dialogue(_action: &SimpleAction, _var: Option<&Variant>) {
let logo = Image::from_file(Path::new("./src/view/resources/logo.png")) let logo = Image::from_file(Path::new(PATH)).paintable().unwrap();
.paintable()
.unwrap();
AboutDialog::builder() AboutDialog::builder()
.authors(vec!["Сагиев А.Д.", "Ефимов И.П."]) .authors(vec!["Сагиев А.Д.", "Ефимов И.П."])