feat: logo and link to website

This commit is contained in:
Louis-Marie Baer 2024-02-27 22:46:27 +01:00
parent 4ef9c902f1
commit edfea23acb
4 changed files with 24 additions and 2 deletions

BIN
images/xvb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View file

@ -52,6 +52,7 @@ pub const DISTRO_NO_UPDATE: &str = r#"This [Gupax] was compiled for use as a Lin
pub const BYTES_ICON: &[u8] = include_bytes!("../images/icons/icon@2x.png");
#[cfg(not(target_os = "macos"))]
pub const BYTES_ICON: &[u8] = include_bytes!("../images/icons/icon.png");
pub const BYTES_XVB: &[u8] = include_bytes!("../images/xvb.png");
pub const BYTES_BANNER: &[u8] = include_bytes!("../images/banner.png");
pub const HORIZONTAL: &str = "--------------------------------------------";
pub const HORI_CONSOLE: &str = "---------------------------------------------------------------------------------------------------------------------------";

View file

@ -2507,7 +2507,7 @@ path_xmr: {:#?}\n
ui.set_max_height(max_height);
// Display [Gupax] banner
let link_width = width/14.0;
ui.add_sized(Vec2::new(width, height*3.0), Image::from_bytes("bytes:/banner.png", BYTES_BANNER));
ui.add_sized(Vec2::new(width, height*3.0), Image::from_bytes("bytes://banner.png", BYTES_BANNER));
ui.add_sized([width, height], Label::new("is a GUI for mining"));
ui.add_sized([link_width, height], Hyperlink::from_label_and_url("[Monero]", "https://www.github.com/monero-project/monero"));
ui.add_sized([width, height], Label::new("on"));

View file

@ -1,4 +1,25 @@
use egui::{Hyperlink, Image};
use crate::constants::{BYTES_XVB, SPACE};
impl crate::disk::Xvb {
#[inline(always)] // called once
pub fn show(_width: f32, _height: f32, _ctx: &egui::Context, _ui: &mut egui::Ui) {}
pub fn show(width: f32, height: f32, _ctx: &egui::Context, ui: &mut egui::Ui) {
let website_height = height / 10.0;
let width = width - SPACE;
// ui.add_sized(
// [width, website_height],
// Hyperlink::from_label_and_url("XMRvsBeast", "https://xmrvsbeast.com"),
// );
ui.vertical_centered(|ui| {
ui.add_sized(
[width, website_height],
Image::from_bytes("bytes:/xvb.png", BYTES_XVB),
);
ui.add_sized(
[width / 8.0, website_height],
Hyperlink::from_label_and_url("XMRvsBeast", "https://xmrvsbeast.com"),
);
});
}
}