1
0
Fork 0
mirror of synced 2024-05-04 20:43:35 +12:00

Use Center instead CenterAlways(GTK Bug) (#361)

This commit is contained in:
Rafał Mikrut 2021-05-17 11:06:22 +02:00 committed by GitHub
parent 2af71023b5
commit bbf7eb3d09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 6 deletions

View file

@ -114,7 +114,7 @@ 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)
window_progress.set_position(WindowPosition::CenterAlways);
window_progress.set_position(WindowPosition::Center);
// Resets progress bars
progress_bar_all_stages.set_fraction(0 as f64);

View file

@ -7,7 +7,7 @@ pub fn connect_button_about(gui_data: &GuiData) {
let about_dialog = gui_data.about.about_dialog.clone();
let button_app_info = gui_data.header.button_app_info.clone();
button_app_info.connect_clicked(move |_| {
about_dialog.set_position(WindowPosition::CenterAlways);
about_dialog.set_position(WindowPosition::Center);
about_dialog.show();
let response = about_dialog.run();
if response != ResponseType::None {

View file

@ -13,7 +13,7 @@ pub fn connect_settings(gui_data: &GuiData) {
button_settings.connect_clicked(move |_| {
window_main.set_sensitive(false);
window_settings.show();
window_settings.set_position(WindowPosition::CenterAlways);
window_settings.set_position(WindowPosition::Center);
});
let window_main = gui_data.window_main.clone();

View file

@ -13,7 +13,7 @@ pub struct GuiAbout {
impl GuiAbout {
pub fn create_from_builder(builder: &gtk::Builder) -> Self {
let about_dialog: gtk::AboutDialog = builder.get_object("about_dialog").unwrap();
about_dialog.set_position(WindowPosition::CenterAlways);
about_dialog.set_position(WindowPosition::Center);
let button_repository: gtk::Button = builder.get_object("button_repository").unwrap();
let button_donation: gtk::Button = builder.get_object("button_donation").unwrap();

View file

@ -87,7 +87,7 @@ impl GuiData {
let window_main: gtk::Window = builder.get_object("window_main").unwrap();
window_main.show_all();
window_main.set_title("Czkawka");
window_main.set_position(WindowPosition::CenterAlways);
window_main.set_position(WindowPosition::Center);
let main_notebook = GuiMainNotebook::create_from_builder(&builder);
let upper_notebook = GuiUpperNotebook::create_from_builder(&builder);

View file

@ -30,7 +30,7 @@ pub struct GuiSettings {
impl GuiSettings {
pub fn create_from_builder(builder: &gtk::Builder) -> Self {
let window_settings: gtk::Window = builder.get_object("window_settings").unwrap();
window_settings.set_position(WindowPosition::CenterAlways);
window_settings.set_position(WindowPosition::Center);
// General
let check_button_settings_save_at_exit: gtk::CheckButton = builder.get_object("check_button_settings_save_at_exit").unwrap();