Skip to content

Commit

Permalink
Center dialog to current window
Browse files Browse the repository at this point in the history
  • Loading branch information
qarmin committed Dec 2, 2020
1 parent e6a6e55 commit a047380
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions czkawka_gui/src/connect_button_search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit a047380

Please sign in to comment.