Skip to content

Commit

Permalink
fix: spacing XvB tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyrix126 committed Dec 12, 2024
1 parent 2c2b5b2 commit 1a81636
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/app/panels/middle/xvb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ impl crate::disk::state::Xvb {
if !self.simple {

ui.group(|ui| {
ui.set_width(0.0);
ui.vertical_centered(|ui| {
ui.style_mut().override_text_valign = Some(Align::Center);
ui.set_height(0.0);
Expand Down Expand Up @@ -173,8 +174,7 @@ impl crate::disk::state::Xvb {
self.manual_donation_metric = ManualDonationMetric::Mega;
self.manual_slider_amount = self.manual_amount_raw / 1_000_000.0;
};
// less menu, less metrics buttons,less space, less metrics.
ui.spacing_mut().slider_width = ui.available_width() * 0.3;
ui.spacing_mut().slider_width = ui.text_style_height(&TextStyle::Button) * 15.3;
ui.add_sized(
[ui.available_width(), text_height],
egui::Slider::new(&mut self.manual_slider_amount, 0.0..=(hashrate_xmrig as f64))
Expand All @@ -183,6 +183,7 @@ impl crate::disk::state::Xvb {
).on_hover_text(slider_help_text);

});
ui.add_space(SPACE);
}

if self.mode == XvbMode::ManualDonationLevel {
Expand All @@ -203,8 +204,8 @@ impl crate::disk::state::Xvb {

api.lock().unwrap().stats_priv.runtime_manual_donation_level = self.manual_donation_level.clone().into();
});
}
ui.add_space(SPACE);
}
});
});
// });
Expand Down

0 comments on commit 1a81636

Please sign in to comment.