Skip to content

Commit a047380

Browse files
committed
Center dialog to current window
1 parent e6a6e55 commit a047380

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

czkawka_gui/src/connect_button_search.rs

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use czkawka_core::temporary::Temporary;
1313
use czkawka_core::zeroed::ZeroedFiles;
1414
use glib::Sender;
1515
use gtk::prelude::*;
16+
use gtk::WindowPosition;
1617
use std::thread;
1718

1819
#[allow(clippy::too_many_arguments)]
@@ -88,6 +89,9 @@ pub fn connect_button_search(
8889

8990
entry_info.set_text("Searching data, it may take a while, please wait...");
9091

92+
// Set dialog to center to current screen(it is impossible to center it to main window)
93+
dialog_progress.set_position(WindowPosition::CenterOnParent);
94+
9195
// Resets progress bars
9296
progress_bar_all_stages.set_fraction(0 as f64);
9397
progress_bar_current_stage.set_fraction(0 as f64);

0 commit comments

Comments
 (0)