[chronojump] EventBoxColorBackgroundActive with distinct color for active, prelight



commit 7c1c9954198a9bc124cf823bc495efc0b70e1f03
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Apr 15 15:50:43 2020 +0200

    EventBoxColorBackgroundActive with distinct color for active, prelight

 src/gui/app1/chronojump.cs |  8 ++++----
 src/gui/app1/menu.cs       | 28 ++++++++++++++--------------
 src/gui/app1/menu_tiny.cs  | 24 ++++++++++++------------
 src/utilGtk.cs             |  6 +++---
 4 files changed, 33 insertions(+), 33 deletions(-)
---
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 4226280b..c390b47d 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -595,10 +595,10 @@ public partial class ChronoJumpWindow
                initForceSensor();
                initRunEncoder();
 
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_radio_mode_contacts_capture, UtilGtk.YELLOW);
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_radio_mode_contacts_analyze, UtilGtk.YELLOW);
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_radio_mode_encoder_capture_small, 
UtilGtk.YELLOW);
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_radio_mode_encoder_analyze_small, 
UtilGtk.YELLOW);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_radio_mode_contacts_capture, UtilGtk.YELLOW, 
UtilGtk.YELLOW_LIGHT);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_radio_mode_contacts_analyze, UtilGtk.YELLOW, 
UtilGtk.YELLOW_LIGHT);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_radio_mode_encoder_capture_small, 
UtilGtk.YELLOW, UtilGtk.YELLOW_LIGHT);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_radio_mode_encoder_analyze_small, 
UtilGtk.YELLOW, UtilGtk.YELLOW_LIGHT);
 
                createComboSelectJumps(true);
                createComboSelectJumpsDjOptimalFall(true);
diff --git a/src/gui/app1/menu.cs b/src/gui/app1/menu.cs
index af07dda7..c2a7b7ee 100644
--- a/src/gui/app1/menu.cs
+++ b/src/gui/app1/menu.cs
@@ -243,20 +243,20 @@ public partial class ChronoJumpWindow
                //UtilGtk.ViewportColor(viewport_menu, UtilGtk.GRAY_LIGHT);
                //UtilGtk.ViewportColor(viewport_persons, UtilGtk.BLUE_CLEAR2);
 
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_radio_show_menu, UtilGtk.YELLOW);
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_radio_show_persons, UtilGtk.YELLOW);
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_show_modes, UtilGtk.YELLOW);
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_check_menu_session, UtilGtk.YELLOW);
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_preferences, UtilGtk.YELLOW);
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_check_menu_help, UtilGtk.YELLOW);
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_exit, UtilGtk.YELLOW);
-
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_session_new, 
UtilGtk.YELLOW_LIGHT);
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_session_load, 
UtilGtk.YELLOW_LIGHT);
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_session_more, 
UtilGtk.YELLOW_LIGHT);
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_help_documents, 
UtilGtk.YELLOW_LIGHT);
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_help_accelerators, 
UtilGtk.YELLOW_LIGHT);
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_help_about, UtilGtk.YELLOW_LIGHT);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_radio_show_menu, UtilGtk.YELLOW, 
UtilGtk.YELLOW_LIGHT);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_radio_show_persons, UtilGtk.YELLOW, 
UtilGtk.YELLOW_LIGHT);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_show_modes, UtilGtk.YELLOW, 
UtilGtk.YELLOW_LIGHT);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_check_menu_session, UtilGtk.YELLOW, 
UtilGtk.YELLOW_LIGHT);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_preferences, UtilGtk.YELLOW, 
UtilGtk.YELLOW_LIGHT);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_check_menu_help, UtilGtk.YELLOW, 
UtilGtk.YELLOW_LIGHT);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_exit, UtilGtk.YELLOW, 
UtilGtk.YELLOW_LIGHT);
+
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_session_new, UtilGtk.YELLOW, 
UtilGtk.YELLOW_LIGHT);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_session_load, UtilGtk.YELLOW, 
UtilGtk.YELLOW_LIGHT);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_session_more, UtilGtk.YELLOW, 
UtilGtk.YELLOW_LIGHT);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_help_documents, UtilGtk.YELLOW, 
UtilGtk.YELLOW_LIGHT);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_help_accelerators, 
UtilGtk.YELLOW, UtilGtk.YELLOW_LIGHT);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_help_about, UtilGtk.YELLOW, 
UtilGtk.YELLOW_LIGHT);
        }
 
        private void menuShowVerticalArrow (bool selected, Gtk.Arrow a_up, Gtk.Arrow a_down)
diff --git a/src/gui/app1/menu_tiny.cs b/src/gui/app1/menu_tiny.cs
index c896ec7f..19fc2f31 100644
--- a/src/gui/app1/menu_tiny.cs
+++ b/src/gui/app1/menu_tiny.cs
@@ -109,18 +109,18 @@ public partial class ChronoJumpWindow
                UtilGtk.ViewportColor(viewport_rest_time_encoder, color);
                UtilGtk.ViewportColor(viewport_image_logo_icon, UtilGtk.BLUE_CHRONOJUMP);
 
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_show_modes1, UtilGtk.YELLOW);
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_check_menu_session1, UtilGtk.YELLOW);
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_preferences1, UtilGtk.YELLOW);
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_check_menu_help1, UtilGtk.YELLOW);
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_exit1, UtilGtk.YELLOW);
-
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_session_new1, 
UtilGtk.YELLOW_LIGHT);
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_session_load1, 
UtilGtk.YELLOW_LIGHT);
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_session_more1, 
UtilGtk.YELLOW_LIGHT);
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_help_documents1, 
UtilGtk.YELLOW_LIGHT);
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_help_accelerators1, 
UtilGtk.YELLOW_LIGHT);
-               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_help_about1, 
UtilGtk.YELLOW_LIGHT);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_show_modes1, UtilGtk.YELLOW, 
UtilGtk.YELLOW_LIGHT);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_check_menu_session1, UtilGtk.YELLOW, 
UtilGtk.YELLOW_LIGHT);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_preferences1, UtilGtk.YELLOW, 
UtilGtk.YELLOW_LIGHT);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_check_menu_help1, UtilGtk.YELLOW, 
UtilGtk.YELLOW_LIGHT);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_exit1, UtilGtk.YELLOW, 
UtilGtk.YELLOW_LIGHT);
+
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_session_new1, UtilGtk.YELLOW, 
UtilGtk.YELLOW_LIGHT);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_session_load1, UtilGtk.YELLOW, 
UtilGtk.YELLOW_LIGHT);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_session_more1, UtilGtk.YELLOW, 
UtilGtk.YELLOW_LIGHT);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_help_documents1, UtilGtk.YELLOW, 
UtilGtk.YELLOW_LIGHT);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_help_accelerators1, 
UtilGtk.YELLOW, UtilGtk.YELLOW_LIGHT);
+               UtilGtk.EventBoxColorBackgroundActive (eventbox_button_menu_help_about1, UtilGtk.YELLOW, 
UtilGtk.YELLOW_LIGHT);
        }
 
 
diff --git a/src/utilGtk.cs b/src/utilGtk.cs
index 37ab07cd..d21f6444 100644
--- a/src/utilGtk.cs
+++ b/src/utilGtk.cs
@@ -621,10 +621,10 @@ public class UtilGtk
        }
 
        //changes of colors without widgets that are in a EventBox
-       public static void EventBoxColorBackgroundActive (Gtk.EventBox e, Gdk.Color color)
+       public static void EventBoxColorBackgroundActive (Gtk.EventBox e, Gdk.Color colorActive, Gdk.Color 
colorPrelight)
        {
-               e.ModifyBg(StateType.Active, color);
-               e.ModifyBg(StateType.Prelight, color);
+               e.ModifyBg(StateType.Active, colorActive);
+               e.ModifyBg(StateType.Prelight, colorPrelight);
        }
 
        public static void ContrastLabelsHBox (bool bgDark, Gtk.HBox hbox)


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