mirror of
https://github.com/Cyrix126/gupaxx.git
synced 2024-12-22 06:39:21 +00:00
feat: remove commented code and dbg
This commit is contained in:
parent
5fb47d4fc9
commit
2e60480ead
2 changed files with 0 additions and 10 deletions
|
@ -66,7 +66,6 @@ impl crate::disk::state::Xvb {
|
|||
debug!("XvB Tab | Rendering [Console]");
|
||||
ui.group(|ui| {
|
||||
let text = &api.lock().unwrap().output;
|
||||
// let nb_lines = num_lines(text);
|
||||
console(ui, text);
|
||||
});
|
||||
// input token
|
||||
|
@ -74,7 +73,6 @@ impl crate::disk::state::Xvb {
|
|||
ui.horizontal(|ui| {
|
||||
ui.group(|ui|{
|
||||
ui.style_mut().override_text_valign = Some(Align::Center);
|
||||
// ui.set_height(height_txt_before_button(ui, &TextStyle::Body));
|
||||
self.field_token(ui);
|
||||
});
|
||||
|
||||
|
@ -100,10 +98,8 @@ impl crate::disk::state::Xvb {
|
|||
ui.vertical_centered(|ui| {
|
||||
ui.style_mut().override_text_valign = Some(Align::Center);
|
||||
ui.set_height(0.0);
|
||||
// ui.horizontal_centered(|ui| {
|
||||
ui.set_height(0.0);
|
||||
let text_height = height_txt_before_button(ui, &TextStyle::Heading) * 1.4;
|
||||
// let text_height = 0.0;
|
||||
egui::ComboBox::from_label("").height(XvbMode::COUNT as f32 * (ui.text_style_height(&TextStyle::Button) + (ui.spacing().button_padding.y * 2.0) + ui.spacing().item_spacing.y))
|
||||
.selected_text(self.mode.to_string())
|
||||
.show_ui(ui, |ui| {
|
||||
|
@ -184,7 +180,6 @@ impl crate::disk::state::Xvb {
|
|||
ui.add_space(SPACE);
|
||||
}
|
||||
|
||||
// ui.spacing_mut().item_spacing.x = ui.text_style_height(&TextStyle::Button);
|
||||
if self.mode == XvbMode::ManualDonationLevel {
|
||||
ui.add_space(SPACE);
|
||||
ui.horizontal(|ui| {
|
||||
|
@ -207,7 +202,6 @@ impl crate::disk::state::Xvb {
|
|||
}
|
||||
});
|
||||
});
|
||||
// });
|
||||
|
||||
// Update manual_amount_raw based on slider
|
||||
match self.manual_donation_metric {
|
||||
|
@ -247,14 +241,12 @@ impl crate::disk::state::Xvb {
|
|||
}
|
||||
// private stats
|
||||
ui.add_space(SPACE);
|
||||
// ui.add_enabled_ui(is_alive, |ui| {
|
||||
ui.add_enabled_ui(is_alive, |ui| {
|
||||
let api = &api.lock().unwrap();
|
||||
let priv_stats = &api.stats_priv;
|
||||
let current_node = &api.current_node;
|
||||
let style_height = ui.text_style_height(&TextStyle::Body);
|
||||
|
||||
// let width_stat = (ui.available_width() - SPACE * 4.0) / 5.0;
|
||||
let width_column = ui.text_style_height(&TextStyle::Body) * 16.0;
|
||||
let height_column = 0.0;
|
||||
ui.style_mut().wrap_mode = Some(egui::TextWrapMode::Extend);
|
||||
|
|
|
@ -270,7 +270,6 @@ mod test {
|
|||
assert!(HumanNumber::to_percent(0.001).to_string() == "0%");
|
||||
assert!(HumanNumber::to_percent(12.123_123).to_string() == "12.12%");
|
||||
assert!(HumanNumber::to_percent_3_point(0.001).to_string() == "0.001%");
|
||||
dbg!(HumanNumber::from_hashrate(&[Some(123), Some(11111), None]).to_string());
|
||||
assert!(
|
||||
HumanNumber::from_hashrate(&[Some(123), Some(11111), None]).to_string()
|
||||
== "[123 H/s]\n[11.111 KH/s]\n[??? H/s]"
|
||||
|
@ -339,7 +338,6 @@ mod test {
|
|||
assert!(HumanTime::into_human(Duration::from_secs(1)).display(true) == "1 second");
|
||||
assert!(HumanTime::into_human(Duration::from_secs(2)).display(true) == "2 seconds");
|
||||
assert!(HumanTime::into_human(Duration::from_secs(59)).display(true) == "59 seconds");
|
||||
dbg!(HumanTime::into_human(Duration::from_secs(60)).display(true));
|
||||
assert!(HumanTime::into_human(Duration::from_secs(60)).display(true) == "1 minute");
|
||||
assert!(
|
||||
HumanTime::into_human(Duration::from_secs(61)).display(true) == "1 minute\n1 second"
|
||||
|
|
Loading…
Reference in a new issue