forked from hinto-janai/gupax
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 = "---------------------------------------------------------------------------------------------------------------------------"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"), | ||
); | ||
}); | ||
} | ||
} |