From b260c8dffbbc7a72c1821cacccde43642a27be2a Mon Sep 17 00:00:00 2001 From: Tony George Date: Sun, 24 Jun 2018 17:14:41 +0530 Subject: [PATCH] Fixed a window sizing issue --- src/Gtk/BackupWindow.vala | 4 +++- src/Gtk/DeleteWindow.vala | 4 +++- src/Gtk/RestoreWindow.vala | 4 ++++ src/Gtk/SettingsWindow.vala | 6 +++++- src/Gtk/SetupWizardWindow.vala | 4 ++++ 5 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/Gtk/BackupWindow.vala b/src/Gtk/BackupWindow.vala index 0ef30f36..c94d19f4 100644 --- a/src/Gtk/BackupWindow.vala +++ b/src/Gtk/BackupWindow.vala @@ -50,7 +50,7 @@ class BackupWindow : Gtk.Window{ private Gtk.Button btn_close; private uint tmr_init; - private int def_width = 450; + private int def_width = 500; private int def_height = 500; private bool success = false; @@ -71,6 +71,8 @@ class BackupWindow : Gtk.Window{ vbox_main.margin = 12; add(vbox_main); + this.resize(def_width, def_height); + // add notebook notebook = add_notebook(vbox_main, false, false); diff --git a/src/Gtk/DeleteWindow.vala b/src/Gtk/DeleteWindow.vala index 041bccb8..1fb78492 100644 --- a/src/Gtk/DeleteWindow.vala +++ b/src/Gtk/DeleteWindow.vala @@ -51,7 +51,7 @@ class DeleteWindow : Gtk.Window{ private Gtk.Button btn_close; private uint tmr_init; - private int def_width = 450; + private int def_width = 500; private int def_height = 500; private bool success = false; @@ -66,6 +66,8 @@ class DeleteWindow : Gtk.Window{ this.icon = IconManager.lookup("timeshift",16); this.delete_event.connect(on_delete_event); + + this.resize(def_width, def_height); // vbox_main vbox_main = new Gtk.Box(Orientation.VERTICAL, 6); diff --git a/src/Gtk/RestoreWindow.vala b/src/Gtk/RestoreWindow.vala index 995f4ec8..839110b6 100644 --- a/src/Gtk/RestoreWindow.vala +++ b/src/Gtk/RestoreWindow.vala @@ -72,6 +72,8 @@ class RestoreWindow : Gtk.Window{ this.set_default_size (def_width, def_height); this.icon = IconManager.lookup("timeshift",16); + this.resize(def_width, def_height); + this.delete_event.connect(on_delete_event); // vbox_main @@ -148,6 +150,8 @@ class RestoreWindow : Gtk.Window{ tmr_init = 0; } + this.resize(def_width, def_height); + go_first(); return false; diff --git a/src/Gtk/SettingsWindow.vala b/src/Gtk/SettingsWindow.vala index f1da740f..0bdc4ac2 100644 --- a/src/Gtk/SettingsWindow.vala +++ b/src/Gtk/SettingsWindow.vala @@ -64,6 +64,8 @@ class SettingsWindow : Gtk.Window{ vbox_main.set_size_request(def_width, def_height); add(vbox_main); + this.resize(def_width, def_height); + var hbox = new Gtk.ButtonBox (Gtk.Orientation.HORIZONTAL); hbox.set_layout (Gtk.ButtonBoxStyle.CENTER); hbox.get_style_context().add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR); @@ -121,7 +123,9 @@ class SettingsWindow : Gtk.Window{ backend_box.refresh(); stack.set_visible_child_name("type"); - //vbox_main.set_size_request(def_width, def_height); + + this.resize(def_width, def_height); + //backup_dev_box.refresh(); //will be triggerred indirectly return false; diff --git a/src/Gtk/SetupWizardWindow.vala b/src/Gtk/SetupWizardWindow.vala index 304036c7..d5835074 100644 --- a/src/Gtk/SetupWizardWindow.vala +++ b/src/Gtk/SetupWizardWindow.vala @@ -75,6 +75,8 @@ class SetupWizardWindow : Gtk.Window{ vbox_main.set_size_request(def_width, def_height); add(vbox_main); + this.resize(def_width, def_height); + if (App.first_run && !schedule_accepted){ App.schedule_boot = false; App.schedule_hourly = false; @@ -138,6 +140,8 @@ class SetupWizardWindow : Gtk.Window{ tmr_init = 0; } + this.resize(def_width, def_height); + go_first(); return false;