[ease] Don't hardcode values in the SpinButtons.



commit 2d4795e7480f3b715a56f68dccf90b6f9361fae6
Author: Stéphane Maniaci <stephane maniaci gmail com>
Date:   Tue May 25 14:13:49 2010 +0200

    Don't hardcode values in the SpinButtons.

 src/WelcomeWindow.vala |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/WelcomeWindow.vala b/src/WelcomeWindow.vala
index 2d878fc..e528372 100644
--- a/src/WelcomeWindow.vala
+++ b/src/WelcomeWindow.vala
@@ -90,13 +90,17 @@ public class Ease.WelcomeWindow : Gtk.Window
 		align.add(resolution);
 		hbox.pack_start(align, false, false, 0);
 		
-		x_res = new Gtk.SpinButton.with_range(320, 1920, 1);
+		x_res = new Gtk.SpinButton.with_range(RESOLUTIONS_X[0],
+											  RESOLUTIONS_Y[RESOLUTION_COUNT-1],
+											  1);
 		x_res.set_value(1024);
 		align = new Gtk.Alignment(0, 0.5f, 0, 0);
 		align.add(x_res);
 		hbox.pack_start(align, false, false, 0);
 		
-		y_res = new Gtk.SpinButton.with_range(240, 1920, 1);
+		y_res = new Gtk.SpinButton.with_range(RESOLUTIONS_Y[0],
+											  RESOLUTIONS_Y[RESOLUTION_COUNT-1],
+											  1);
 		y_res.set_value(768);
 		align = new Gtk.Alignment(0, 0.5f, 0, 0);
 		align.add(y_res);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]