Use set_default_size instead of set_size_request for Window

This allows the user to resize the window to a smaller size.

issue5045
review15741003
This commit is contained in:
Cédric Krier committed 2015-11-05 23:31:37 +01:00
1 parent c13ba9afa9
commit 9092ead1fa
3 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -375,7 +375,7 @@ def selection(title, values, alwaysask=False):
dialog.set_icon(TRYTON_ICON)
dialog.set_has_separator(True)
dialog.set_default_response(gtk.RESPONSE_OK)
dialog.set_size_request(400, 400)
dialog.set_default_size(400, 400)
label = gtk.Label(title or _('Your selection:'))
dialog.vbox.pack_start(label, False, False)
@@ -888,7 +888,7 @@ class ErrorDialog(UniqueDialog):
vbox.pack_start(button_roundup, False, False)
dialog.vbox.pack_start(vbox)
dialog.set_size_request(600, 400)
dialog.set_default_size(600, 400)
return dialog
def __call__(self, title, details):
+1 -1
View File
@@ -47,7 +47,7 @@ You can save any graphs in PNG file with right-click on it.
self.win.set_position(gtk.WIN_POS_CENTER_ON_PARENT)
self.win.set_icon(TRYTON_ICON)
self.win.set_has_separator(True)
self.win.set_size_request(500, 400)
self.win.set_default_size(500, 400)
self.win.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)
self.win.set_default_response(gtk.RESPONSE_CLOSE)
+1 -1
View File
@@ -76,7 +76,7 @@ class WinSearch(NoModal):
self.model_name = model
self.win.set_size_request(700, 500)
self.win.set_default_size(700, 500)
self.register()
sensible_allocation = self.sensible_widget.get_allocation()