mirror of
https://github.com/Cyrix126/gupaxx.git
synced 2024-12-22 22:59:27 +00:00
feat: logo and link to website
This commit is contained in:
parent
4ef9c902f1
commit
edfea23acb
4 changed files with 24 additions and 2 deletions
BIN
images/xvb.png
Normal file
BIN
images/xvb.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
|
@ -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");
|
pub const BYTES_ICON: &[u8] = include_bytes!("../images/icons/icon@2x.png");
|
||||||
#[cfg(not(target_os = "macos"))]
|
#[cfg(not(target_os = "macos"))]
|
||||||
pub const BYTES_ICON: &[u8] = include_bytes!("../images/icons/icon.png");
|
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 BYTES_BANNER: &[u8] = include_bytes!("../images/banner.png");
|
||||||
pub const HORIZONTAL: &str = "--------------------------------------------";
|
pub const HORIZONTAL: &str = "--------------------------------------------";
|
||||||
pub const HORI_CONSOLE: &str = "---------------------------------------------------------------------------------------------------------------------------";
|
pub const HORI_CONSOLE: &str = "---------------------------------------------------------------------------------------------------------------------------";
|
||||||
|
|
|
@ -2507,7 +2507,7 @@ path_xmr: {:#?}\n
|
||||||
ui.set_max_height(max_height);
|
ui.set_max_height(max_height);
|
||||||
// Display [Gupax] banner
|
// Display [Gupax] banner
|
||||||
let link_width = width/14.0;
|
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([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([link_width, height], Hyperlink::from_label_and_url("[Monero]", "https://www.github.com/monero-project/monero"));
|
||||||
ui.add_sized([width, height], Label::new("on"));
|
ui.add_sized([width, height], Label::new("on"));
|
||||||
|
|
23
src/xvb.rs
23
src/xvb.rs
|
@ -1,4 +1,25 @@
|
||||||
|
use egui::{Hyperlink, Image};
|
||||||
|
|
||||||
|
use crate::constants::{BYTES_XVB, SPACE};
|
||||||
|
|
||||||
impl crate::disk::Xvb {
|
impl crate::disk::Xvb {
|
||||||
#[inline(always)] // called once
|
#[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"),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue