fix: hide logo on advanced mode not enough height

This commit is contained in:
mostafaei2002 2024-06-06 17:45:28 +03:30
parent 4ad48308e3
commit 973bb05c66

View file

@ -33,21 +33,23 @@ impl crate::disk::state::Xvb {
api: &Arc<Mutex<PubXvbApi>>, api: &Arc<Mutex<PubXvbApi>>,
private_stats: bool, private_stats: bool,
) { ) {
let website_height = size.y / 10.0; if self.simple {
let width = size.x; let website_height = size.y / 10.0;
let height = size.y; let width = size.x;
let space_h = height / 48.0; let height = size.y;
// logo and website link let space_h = height / 48.0;
ui.vertical_centered(|ui| { // logo and website link
ui.add_sized( ui.vertical_centered(|ui| {
[width, website_height], ui.add_sized(
Image::from_bytes("bytes:/xvb.png", BYTES_XVB), [width, website_height],
); Image::from_bytes("bytes:/xvb.png", BYTES_XVB),
ui.style_mut().override_text_style = Some(TextStyle::Heading); );
ui.add_space(space_h); ui.style_mut().override_text_style = Some(TextStyle::Heading);
ui.hyperlink_to("XMRvsBeast", XVB_URL); ui.add_space(space_h);
ui.add_space(space_h); ui.hyperlink_to("XMRvsBeast", XVB_URL);
}); ui.add_space(space_h);
});
}
// console output for log // console output for log
debug!("XvB Tab | Rendering [Console]"); debug!("XvB Tab | Rendering [Console]");
ui.group(|ui| { ui.group(|ui| {