Skip to content

Commit

Permalink
feat: logo and link to website
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyrix126 committed Feb 27, 2024
1 parent 4ef9c90 commit edfea23
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
Binary file added images/xvb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]");
#[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 = "---------------------------------------------------------------------------------------------------------------------------";
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down
23 changes: 22 additions & 1 deletion src/xvb.rs
Original file line number Diff line number Diff line change
@@ -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"),
);
});
}
}

0 comments on commit edfea23

Please sign in to comment.