[chronojump] gui: improved top buttons



commit 5010f8e2b14174dddc390ba6c55836e5553e644e
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Mar 24 16:09:50 2011 +0100

    gui: improved top buttons

 glade/chronojump.glade |    2 +-
 src/gui/chronojump.cs  |  144 ++++++++++++++++++++++++------------------------
 src/utilGtk.cs         |   12 ++++-
 3 files changed, 84 insertions(+), 74 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index fd9f306..785328e 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -15629,7 +15629,7 @@ by you</property>
                       <widget class="GtkViewport" id="viewport_mode">
                         <property name="visible">True</property>
                         <property name="resize_mode">queue</property>
-                        <property name="hadjustment">0 0 730 73 657 730</property>
+                        <property name="hadjustment">0 0 769 76.900000000000006 692.10000000000002 769</property>
                         <property name="shadow_type">out</property>
                         <child>
                           <widget class="GtkHButtonBox" id="hbuttonbox2">
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 231809a..43c101e 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -515,21 +515,21 @@ public partial class ChronoJumpWindow
 		//change colors of tests mode
 		viewport_mode.ModifyBg(StateType.Normal, UtilGtk.WHITE);
 
-		label_mode_jumps.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_mode_jumps_reactive.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_mode_runs.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_mode_runs_intervallic.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_mode_reaction_times.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_mode_pulses.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_mode_multi_chronopic.ModifyFg(StateType.Active, UtilGtk.WHITE);
-
-		UtilGtk.ColorsMenuRadio(radio_mode_jumps);
-		UtilGtk.ColorsMenuRadio(radio_mode_jumps_reactive);
-		UtilGtk.ColorsMenuRadio(radio_mode_runs);
-		UtilGtk.ColorsMenuRadio(radio_mode_runs_intervallic);
-		UtilGtk.ColorsMenuRadio(radio_mode_reaction_times);
-		UtilGtk.ColorsMenuRadio(radio_mode_pulses);
-		UtilGtk.ColorsMenuRadio(radio_mode_multi_chronopic);
+		UtilGtk.ColorsMenuLabel(label_mode_jumps);
+		UtilGtk.ColorsMenuLabel(label_mode_jumps_reactive);
+		UtilGtk.ColorsMenuLabel(label_mode_runs);
+		UtilGtk.ColorsMenuLabel(label_mode_runs_intervallic);
+		UtilGtk.ColorsMenuLabel(label_mode_reaction_times);
+		UtilGtk.ColorsMenuLabel(label_mode_pulses);
+		UtilGtk.ColorsMenuLabel(label_mode_multi_chronopic);
+
+		UtilGtk.ColorsRadio(radio_mode_jumps);
+		UtilGtk.ColorsRadio(radio_mode_jumps_reactive);
+		UtilGtk.ColorsRadio(radio_mode_runs);
+		UtilGtk.ColorsRadio(radio_mode_runs_intervallic);
+		UtilGtk.ColorsRadio(radio_mode_reaction_times);
+		UtilGtk.ColorsRadio(radio_mode_pulses);
+		UtilGtk.ColorsRadio(radio_mode_multi_chronopic);
 		
 		pixbuf = new Pixbuf (null, Util.GetImagePath(false) + Constants.FileNameJumps);
 		image_mode_jumps.Pixbuf = pixbuf;
@@ -548,69 +548,69 @@ public partial class ChronoJumpWindow
 
 		
 		//jumps changes
-		label_extra_window_radio_jump_free.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_extra_window_radio_jump_sj.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_extra_window_radio_jump_sjl.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_extra_window_radio_jump_cmj.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_extra_window_radio_jump_cmjl.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_extra_window_radio_jump_abk.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_extra_window_radio_jump_dj.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_extra_window_radio_jump_rocket.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_extra_window_radio_jump_takeoff.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_extra_window_radio_jump_more.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		
-		UtilGtk.ColorsMenuRadio(extra_window_radio_jump_free);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_jump_sj);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_jump_sjl);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_jump_cmj);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_jump_cmjl);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_jump_abk);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_jump_dj);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_jump_rocket);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_jump_takeoff);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_jump_more);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_jump_free);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_jump_sj);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_jump_sjl);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_jump_cmj);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_jump_cmjl);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_jump_abk);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_jump_dj);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_jump_rocket);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_jump_takeoff);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_jump_more);
+		
+		UtilGtk.ColorsRadio(extra_window_radio_jump_free);
+		UtilGtk.ColorsRadio(extra_window_radio_jump_sj);
+		UtilGtk.ColorsRadio(extra_window_radio_jump_sjl);
+		UtilGtk.ColorsRadio(extra_window_radio_jump_cmj);
+		UtilGtk.ColorsRadio(extra_window_radio_jump_cmjl);
+		UtilGtk.ColorsRadio(extra_window_radio_jump_abk);
+		UtilGtk.ColorsRadio(extra_window_radio_jump_dj);
+		UtilGtk.ColorsRadio(extra_window_radio_jump_rocket);
+		UtilGtk.ColorsRadio(extra_window_radio_jump_takeoff);
+		UtilGtk.ColorsRadio(extra_window_radio_jump_more);
 
 		//jumpsRj changes
-		label_extra_window_radio_jump_rj_j.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_extra_window_radio_jump_rj_t.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_extra_window_radio_jump_rj_unlimited.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_extra_window_radio_jump_rj_hexagon.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_extra_window_radio_jump_rj_more.ModifyFg(StateType.Active, UtilGtk.WHITE);
-
-		UtilGtk.ColorsMenuRadio(extra_window_radio_jump_rj_j);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_jump_rj_t);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_jump_rj_unlimited);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_jump_rj_hexagon);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_jump_rj_more);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_jump_rj_j);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_jump_rj_t);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_jump_rj_unlimited);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_jump_rj_hexagon);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_jump_rj_more);
+
+		UtilGtk.ColorsRadio(extra_window_radio_jump_rj_j);
+		UtilGtk.ColorsRadio(extra_window_radio_jump_rj_t);
+		UtilGtk.ColorsRadio(extra_window_radio_jump_rj_unlimited);
+		UtilGtk.ColorsRadio(extra_window_radio_jump_rj_hexagon);
+		UtilGtk.ColorsRadio(extra_window_radio_jump_rj_more);
 
 		//runs changes
-		label_extra_window_radio_run_custom.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_extra_window_radio_run_20m.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_extra_window_radio_run_100m.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_extra_window_radio_run_200m.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_extra_window_radio_run_400m.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_extra_window_radio_run_gesell.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_extra_window_radio_run_20yard.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_extra_window_radio_run_505.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_extra_window_radio_run_illinois.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_extra_window_radio_run_margaria.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_extra_window_radio_run_shuttle.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		label_extra_window_radio_run_zigzag.ModifyFg(StateType.Active, UtilGtk.WHITE);
-		
-		UtilGtk.ColorsMenuRadio(extra_window_radio_run_more);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_run_custom);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_run_20m);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_run_100m);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_run_200m);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_run_400m);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_run_gesell);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_run_20yard);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_run_505);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_run_illinois);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_run_margaria);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_run_shuttle);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_run_zigzag);
-		UtilGtk.ColorsMenuRadio(extra_window_radio_run_more);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_run_custom);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_run_20m);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_run_100m);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_run_200m);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_run_400m);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_run_gesell);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_run_20yard);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_run_505);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_run_illinois);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_run_margaria);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_run_shuttle);
+		UtilGtk.ColorsTestLabel(label_extra_window_radio_run_zigzag);
+		
+		UtilGtk.ColorsRadio(extra_window_radio_run_more);
+		UtilGtk.ColorsRadio(extra_window_radio_run_custom);
+		UtilGtk.ColorsRadio(extra_window_radio_run_20m);
+		UtilGtk.ColorsRadio(extra_window_radio_run_100m);
+		UtilGtk.ColorsRadio(extra_window_radio_run_200m);
+		UtilGtk.ColorsRadio(extra_window_radio_run_400m);
+		UtilGtk.ColorsRadio(extra_window_radio_run_gesell);
+		UtilGtk.ColorsRadio(extra_window_radio_run_20yard);
+		UtilGtk.ColorsRadio(extra_window_radio_run_505);
+		UtilGtk.ColorsRadio(extra_window_radio_run_illinois);
+		UtilGtk.ColorsRadio(extra_window_radio_run_margaria);
+		UtilGtk.ColorsRadio(extra_window_radio_run_shuttle);
+		UtilGtk.ColorsRadio(extra_window_radio_run_zigzag);
+		UtilGtk.ColorsRadio(extra_window_radio_run_more);
 
 
 
diff --git a/src/utilGtk.cs b/src/utilGtk.cs
index 254d33c..75cccd1 100644
--- a/src/utilGtk.cs
+++ b/src/utilGtk.cs
@@ -28,6 +28,7 @@ using Gdk;
 public class UtilGtk
 {
 	public static Gdk.Color WHITE = new Gdk.Color(0xff,0xff,0xff);
+	public static Gdk.Color BLACK = new Gdk.Color(0x00,0x00,0x00);
 	public static Gdk.Color BLUE = new Gdk.Color(0x6c,0x77,0xab);
 	public static Gdk.Color BLUE_CLEAR = new Gdk.Color(0xa0,0xa7,0xca);
 	public static Gdk.Color GREEN = new Gdk.Color(0xa8,0xaf,0xd0);
@@ -202,7 +203,16 @@ public class UtilGtk
 		combo.Sensitive = true;
 	}
 	
-	public static void ColorsMenuRadio(Gtk.RadioButton r) {
+	public static void ColorsMenuLabel(Gtk.Label l) {
+		l.ModifyFg(StateType.Active, UtilGtk.WHITE);
+		l.ModifyFg(StateType.Normal, UtilGtk.BLACK);
+	}
+	
+	public static void ColorsTestLabel(Gtk.Label l) {
+		l.ModifyFg(StateType.Active, UtilGtk.WHITE);
+	}
+	
+	public static void ColorsRadio(Gtk.RadioButton r) {
 		r.ModifyBg(StateType.Normal, WHITE);
 		r.ModifyBg(StateType.Active, BLUE);
 		r.ModifyBg(StateType.Prelight, BLUE_CLEAR);



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