Use the same size for dialog as the sensible parent

issue6997
review36881002
This commit is contained in:
Cédric Krier committed 2017-12-26 17:29:55 +01:00
1 parent 802a0a27e2
commit 02f22d99c2
6 files changed
+10 -11

No files matched your search

+1 -1
View File
@@ -75,7 +75,7 @@ class Preference(NoModal):
self.win.set_title(_('Preference'))
width, height = self.parent.get_size()
self.win.set_default_size(int(width * 0.9), int(height * 0.9))
self.win.set_default_size(width, height)
self.register()
self.win.show()
@@ -206,8 +206,8 @@ class TranslateDialog(NoModal):
self.win.vbox.pack_start(scrolledwindow, True, True)
sensible_allocation = self.sensible_widget.get_allocation()
self.win.set_default_size(int(sensible_allocation.width * 0.9),
int(sensible_allocation.height * 0.9))
self.win.set_default_size(
sensible_allocation.width, sensible_allocation.height)
self.register()
self.win.show_all()
+1 -2
View File
@@ -209,8 +209,7 @@ class WinCSV(NoModal):
sensible_allocation = self.sensible_widget.get_allocation()
self.dialog.set_default_size(
int(sensible_allocation.width * 0.9),
int(sensible_allocation.height * 0.9))
sensible_allocation.width, sensible_allocation.height)
self.dialog.show_all()
center_window(self.dialog, self.parent, self.sensible_widget)
+2 -2
View File
@@ -251,8 +251,8 @@ class WinForm(NoModal, InfoBar):
self.win.vbox.pack_start(self.info_bar, False, True)
sensible_allocation = self.sensible_widget.get_allocation()
self.win.set_default_size(int(sensible_allocation.width * 0.9),
int(sensible_allocation.height * 0.9))
self.win.set_default_size(
sensible_allocation.width, sensible_allocation.height)
if view_type == 'tree':
self.screen.signal_connect(self, 'record-message', self._sig_label)
+2 -2
View File
@@ -85,8 +85,8 @@ class WinSearch(NoModal):
self.register()
sensible_allocation = self.sensible_widget.get_allocation()
self.win.set_default_size(int(sensible_allocation.width * 0.9),
int(sensible_allocation.height * 0.9))
self.win.set_default_size(
sensible_allocation.width, sensible_allocation.height)
def sig_activate(self, *args):
self.view.treeview.emit_stop_by_name('row_activated')
+2 -2
View File
@@ -336,8 +336,8 @@ class WizardDialog(Wizard, NoModal):
# Dialog must be shown before the screen is displayed
# to get the treeview realized when displayed
sensible_allocation = self.sensible_widget.get_allocation()
self.dia.set_default_size(int(sensible_allocation.width * 0.9),
int(sensible_allocation.height * 0.9))
self.dia.set_default_size(
sensible_allocation.width, sensible_allocation.height)
self.dia.show()
common.center_window(self.dia, self.parent, self.sensible_widget)
super(WizardDialog, self).update(view, defaults, buttons)