[chronojump] Highlighted colors related to theme (!always blue)
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Highlighted colors related to theme (!always blue)
- Date: Fri, 19 Apr 2013 08:35:28 +0000 (UTC)
commit 09d442e8de20613a7326ed3acecd3ad22d527a29
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Apr 19 10:34:18 2013 +0200
Highlighted colors related to theme (!always blue)
src/gui/chronojump.cs | 194 +++++++++++++++++++++++++-------------------------
src/utilGtk.cs | 44 ++++++------
2 files changed, 121 insertions(+), 117 deletions(-)
---
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 9869270..aeffb14 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -577,21 +577,21 @@ public partial class ChronoJumpWindow
*/
//viewport_mode_small.ModifyBg(StateType.Normal, UtilGtk.WHITE);
- UtilGtk.ColorsMenuLabel(label_mode_jumps_small);
- UtilGtk.ColorsMenuLabel(label_mode_jumps_reactive_small);
- UtilGtk.ColorsMenuLabel(label_mode_runs_small);
- UtilGtk.ColorsMenuLabel(label_mode_runs_intervallic_small);
- UtilGtk.ColorsMenuLabel(label_mode_reaction_times_small);
- UtilGtk.ColorsMenuLabel(label_mode_pulses_small);
- UtilGtk.ColorsMenuLabel(label_mode_multi_chronopic_small);
-
- UtilGtk.ColorsRadio(radio_mode_jumps_small);
- UtilGtk.ColorsRadio(radio_mode_jumps_reactive_small);
- UtilGtk.ColorsRadio(radio_mode_runs_small);
- UtilGtk.ColorsRadio(radio_mode_runs_intervallic_small);
- UtilGtk.ColorsRadio(radio_mode_reaction_times_small);
- UtilGtk.ColorsRadio(radio_mode_pulses_small);
- UtilGtk.ColorsRadio(radio_mode_multi_chronopic_small);
+ UtilGtk.ColorsMenuLabel(viewport_chronopics, label_mode_jumps_small);
+ UtilGtk.ColorsMenuLabel(viewport_chronopics, label_mode_jumps_reactive_small);
+ UtilGtk.ColorsMenuLabel(viewport_chronopics, label_mode_runs_small);
+ UtilGtk.ColorsMenuLabel(viewport_chronopics, label_mode_runs_intervallic_small);
+ UtilGtk.ColorsMenuLabel(viewport_chronopics, label_mode_reaction_times_small);
+ UtilGtk.ColorsMenuLabel(viewport_chronopics, label_mode_pulses_small);
+ UtilGtk.ColorsMenuLabel(viewport_chronopics, label_mode_multi_chronopic_small);
+
+ UtilGtk.ColorsRadio(viewport_chronopics, radio_mode_jumps_small);
+ UtilGtk.ColorsRadio(viewport_chronopics, radio_mode_jumps_reactive_small);
+ UtilGtk.ColorsRadio(viewport_chronopics, radio_mode_runs_small);
+ UtilGtk.ColorsRadio(viewport_chronopics, radio_mode_runs_intervallic_small);
+ UtilGtk.ColorsRadio(viewport_chronopics, radio_mode_reaction_times_small);
+ UtilGtk.ColorsRadio(viewport_chronopics, radio_mode_pulses_small);
+ UtilGtk.ColorsRadio(viewport_chronopics, radio_mode_multi_chronopic_small);
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + Constants.FileNameJumps);
image_mode_jumps_small.Pixbuf = pixbuf;
@@ -610,100 +610,100 @@ public partial class ChronoJumpWindow
//jumps changes
- 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_slcmj);
- 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_slcmj);
- 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);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_jump_free);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_jump_sj);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_jump_sjl);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_jump_cmj);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_jump_cmjl);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_jump_slcmj);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_jump_abk);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_jump_dj);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_jump_rocket);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_jump_takeoff);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_jump_more);
+
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_jump_free);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_jump_sj);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_jump_sjl);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_jump_cmj);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_jump_cmjl);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_jump_slcmj);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_jump_abk);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_jump_dj);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_jump_rocket);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_jump_takeoff);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_jump_more);
//jumpsRj changes
- 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);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_jump_rj_j);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_jump_rj_t);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_jump_rj_unlimited);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_jump_rj_hexagon);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_jump_rj_more);
+
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_jump_rj_j);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_jump_rj_t);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_jump_rj_unlimited);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_jump_rj_hexagon);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_jump_rj_more);
//runs changes
- 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);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_run_custom);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_run_20m);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_run_100m);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_run_200m);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_run_400m);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_run_gesell);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_run_20yard);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_run_505);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_run_illinois);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_run_margaria);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_run_shuttle);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_run_zigzag);
+
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_run_more);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_run_custom);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_run_20m);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_run_100m);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_run_200m);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_run_400m);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_run_gesell);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_run_20yard);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_run_505);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_run_illinois);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_run_margaria);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_run_shuttle);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_run_zigzag);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_run_more);
//runs intervalchanges
- UtilGtk.ColorsTestLabel(label_extra_window_radio_run_interval_by_laps);
- UtilGtk.ColorsTestLabel(label_extra_window_radio_run_interval_by_time);
- UtilGtk.ColorsTestLabel(label_extra_window_radio_run_interval_unlimited);
- UtilGtk.ColorsTestLabel(label_extra_window_radio_run_interval_mtgug);
- UtilGtk.ColorsTestLabel(label_extra_window_radio_run_interval_more);
-
- UtilGtk.ColorsRadio(extra_window_radio_run_interval_by_laps);
- UtilGtk.ColorsRadio(extra_window_radio_run_interval_by_time);
- UtilGtk.ColorsRadio(extra_window_radio_run_interval_unlimited);
- UtilGtk.ColorsRadio(extra_window_radio_run_interval_mtgug);
- UtilGtk.ColorsRadio(extra_window_radio_run_interval_more);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_run_interval_by_laps);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_run_interval_by_time);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_run_interval_unlimited);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_run_interval_mtgug);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_run_interval_more);
+
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_run_interval_by_laps);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_run_interval_by_time);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_run_interval_unlimited);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_run_interval_mtgug);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_run_interval_more);
//reaction times changes
- UtilGtk.ColorsTestLabel(label_extra_window_radio_reaction_time);
- UtilGtk.ColorsRadio(extra_window_radio_reaction_time);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_reaction_time);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_reaction_time);
//pulses changes
- UtilGtk.ColorsTestLabel(label_extra_window_radio_pulses_free);
- UtilGtk.ColorsTestLabel(label_extra_window_radio_pulses_custom);
- UtilGtk.ColorsRadio(extra_window_radio_pulses_free);
- UtilGtk.ColorsRadio(extra_window_radio_pulses_custom);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_pulses_free);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_pulses_custom);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_pulses_free);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_pulses_custom);
//multichronopic changes
- UtilGtk.ColorsTestLabel(label_extra_window_radio_multichronopic_start);
- UtilGtk.ColorsTestLabel(label_extra_window_radio_multichronopic_run_analysis);
- UtilGtk.ColorsRadio(extra_window_radio_multichronopic_start);
- UtilGtk.ColorsRadio(extra_window_radio_multichronopic_run_analysis);
+ UtilGtk.ColorsTestLabel(viewport_chronopics, label_extra_window_radio_multichronopic_start);
+ UtilGtk.ColorsTestLabel(viewport_chronopics,
label_extra_window_radio_multichronopic_run_analysis);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_multichronopic_start);
+ UtilGtk.ColorsRadio(viewport_chronopics, extra_window_radio_multichronopic_run_analysis);
//persons buttons
diff --git a/src/utilGtk.cs b/src/utilGtk.cs
index 6e4f0cc..d4b2b3f 100644
--- a/src/utilGtk.cs
+++ b/src/utilGtk.cs
@@ -243,39 +243,42 @@ public class UtilGtk
public static Gdk.Color BLUE_PLOTS = new Gdk.Color(0,0,238);
- public static void ColorsMenuLabel(Gtk.Label l) {
- l.ModifyFg(StateType.Active, WHITE);
- l.ModifyFg(StateType.Normal, BLACK);
+ public static void ColorsMenuLabel(Gtk.Viewport v, Gtk.Label l) {
+ l.ModifyFg(StateType.Active, v.Style.Foreground(StateType.Selected));
+ l.ModifyFg(StateType.Prelight, v.Style.Foreground(StateType.Selected));
}
- public static void ColorsTestLabel(Gtk.Label l) {
- l.ModifyFg(StateType.Active, WHITE);
+ public static void ColorsTestLabel(Gtk.Viewport v, Gtk.Label l) {
+ l.ModifyFg(StateType.Active, v.Style.Foreground(StateType.Selected));
+ l.ModifyFg(StateType.Prelight, v.Style.Foreground(StateType.Selected));
}
- public static void ColorsRadio(Gtk.RadioButton r) {
- r.ModifyBg(StateType.Normal, WHITE);
- r.ModifyBg(StateType.Active, BLUE);
- r.ModifyBg(StateType.Prelight, BLUE_CLEAR);
+ public static void ColorsRadio(Gtk.Viewport v, Gtk.RadioButton r) {
+ r.ModifyBg(StateType.Active, v.Style.Background(StateType.Selected));
+ r.ModifyBg(StateType.Prelight, v.Style.Background(StateType.Selected));
}
- public static void ColorsCheck(Gtk.CheckButton c) {
- c.ModifyBg(StateType.Normal, WHITE);
- c.ModifyBg(StateType.Active, BLUE);
- c.ModifyBg(StateType.Prelight, BLUE_CLEAR);
- }
-
public static void ColorsCheckOnlyPrelight(Gtk.CheckButton c) {
- c.ModifyBg(StateType.Normal, WHITE);
- c.ModifyBg(StateType.Active, WHITE);
- c.ModifyBg(StateType.Prelight, BLUE_CLEAR);
+ //c.ModifyBg(StateType.Normal, WHITE);
+ //c.ModifyBg(StateType.Active, WHITE);
+ //c.ModifyBg(StateType.Prelight, BLUE_CLEAR);
+
+ //c.ModifyBg(StateType.Active, c.Style.Background(StateType.Selected));
+ //c.ModifyBg(StateType.Prelight, c.Style.Background(StateType.Selected));
}
+ public static void ColorsTreeView(Gtk.Viewport v, Gtk.TreeView tv) {
+ tv.ModifyBg(StateType.Active, v.Style.Background(StateType.Selected));
+ tv.ModifyBg(StateType.Prelight, v.Style.Background(StateType.Selected));
+ }
+
private static Gdk.Color chronopicViewportDefaultBg;
private static Gdk.Color chronopicLabelsDefaultFg;
public static void ChronopicColors(Gtk.Viewport v, Gtk.Label l1, Gtk.Label l2, bool connected) {
- if(! v.Style.Background(StateType.Normal).Equal(BLUE))
+ //if(! v.Style.Background(StateType.Normal).Equal(BLUE))
+ if(! v.Style.Background(StateType.Normal).Equal(v.Style.Background(StateType.Selected)))
chronopicViewportDefaultBg = v.Style.Background(StateType.Normal);
if(! l1.Style.Foreground(StateType.Normal).Equal(WHITE))
chronopicLabelsDefaultFg = l1.Style.Foreground(StateType.Normal);
@@ -285,7 +288,8 @@ public class UtilGtk
l1.ModifyFg(StateType.Normal, chronopicLabelsDefaultFg);
l2.ModifyFg(StateType.Normal, chronopicLabelsDefaultFg);
} else {
- v.ModifyBg(StateType.Normal, BLUE);
+ //v.ModifyBg(StateType.Normal, BLUE);
+ v.ModifyBg(StateType.Normal, v.Style.Background(StateType.Selected));
l1.ModifyFg(StateType.Normal, WHITE);
l2.ModifyFg(StateType.Normal, WHITE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]