1
0
Fork 0
mirror of synced 2024-05-06 05:22:25 +12:00

Center dialog to current window

This commit is contained in:
Rafał Mikrut 2020-12-02 17:34:19 +01:00
parent e6a6e5567b
commit a047380dbe

View file

@ -13,6 +13,7 @@ use czkawka_core::temporary::Temporary;
use czkawka_core::zeroed::ZeroedFiles;
use glib::Sender;
use gtk::prelude::*;
use gtk::WindowPosition;
use std::thread;
#[allow(clippy::too_many_arguments)]
@ -88,6 +89,9 @@ pub fn connect_button_search(
entry_info.set_text("Searching data, it may take a while, please wait...");
// Set dialog to center to current screen(it is impossible to center it to main window)
dialog_progress.set_position(WindowPosition::CenterOnParent);
// Resets progress bars
progress_bar_all_stages.set_fraction(0 as f64);
progress_bar_current_stage.set_fraction(0 as f64);