Don't show apply button on GPU selection

This commit is contained in:
Ilya Zlobintsev
2021-02-09 12:15:49 +02:00
parent e8e6dc4ed3
commit 8458e3cb77
2 changed files with 7 additions and 2 deletions

View File

@@ -135,6 +135,8 @@ impl App {
.set_ventilation_info(fan_control_info),
Err(_) => self.root_stack.thermals_page.hide_fan_controls(),
}
self.apply_revealer.hide();
}
fn start_stats_update_loop(&self, current_gpu_id: Arc<AtomicU32>) {

View File

@@ -27,13 +27,16 @@ impl ApplyRevealer {
pub fn show(&self) {
self.container.set_reveal_child(true);
}
pub fn hide(&self) {
self.container.set_reveal_child(false);
}
pub fn connect_apply_button_clicked<F: Fn() + 'static>(&self, f: F) {
let apply_revealer = self.container.clone();
self.apply_button.connect_clicked(move |_| {
f();
apply_revealer.set_reveal_child(false);
});
}
}