[chronojump] Encoder ec if ! EncoderPhasesEnum.BOTH, show unwanted on gray (graph & treeview)
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Encoder ec if ! EncoderPhasesEnum.BOTH, show unwanted on gray (graph & treeview)
- Date: Thu, 4 Jun 2020 17:55:27 +0000 (UTC)
commit 3431474a2b6512fa146ad110c7e704b1b6b97c4a
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Jun 4 19:52:42 2020 +0200
Encoder ec if ! EncoderPhasesEnum.BOTH, show unwanted on gray (graph & treeview)
src/gui/encoderGraphObjects.cs | 11 +++++++++++
src/gui/repetitiveConditions.cs | 4 ++--
src/utilGtk.cs | 3 ++-
3 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/src/gui/encoderGraphObjects.cs b/src/gui/encoderGraphObjects.cs
index 724cc308..a2967810 100644
--- a/src/gui/encoderGraphObjects.cs
+++ b/src/gui/encoderGraphObjects.cs
@@ -626,6 +626,17 @@ public class EncoderGraphDoPlot
if(preferences.volumeOn && count == data.Count -1 && capturing)
Util.PlaySound(Constants.SoundTypes.BAD, preferences.volumeOn,
preferences.gstreamer);
}
+ else if(myColor == UtilGtk.ColorGray)
+ {
+ /*
+ * on ecS when feedback is only in the opposite phase,
+ * AssignColorAutomatic will return ColorGray
+ * this helps to distinguins the phase that we want
+ */
+ my_pen_ecc_con_e = pen_gray;
+ my_pen_ecc_con_c = pen_gray;
+ my_pen_con = pen_gray;
+ }
else {
my_pen_ecc_con_e = pen_blue_dark_encoder_capture;
my_pen_ecc_con_c = pen_blue_light_encoder_capture;
diff --git a/src/gui/repetitiveConditions.cs b/src/gui/repetitiveConditions.cs
index 2efcd2c2..d215ecad 100644
--- a/src/gui/repetitiveConditions.cs
+++ b/src/gui/repetitiveConditions.cs
@@ -805,9 +805,9 @@ public class RepetitiveConditionsWindow
//note on "c" phaseEnum will be BOTH
if(radio_encoder_eccon_ecc.Active && phaseEnum == Preferences.EncoderPhasesEnum.CON)
- return UtilGtk.ColorNothing;
+ return UtilGtk.ColorGray;
else if(radio_encoder_eccon_con.Active && phaseEnum == Preferences.EncoderPhasesEnum.ECC)
- return UtilGtk.ColorNothing;
+ return UtilGtk.ColorGray;
if(EncoderAutomaticHigherActive && currentValue > getBestSetValue(b) *
EncoderAutomaticHigherValue / 100)
return UtilGtk.ColorGood;
diff --git a/src/utilGtk.cs b/src/utilGtk.cs
index 1bf6c4cf..623db166 100644
--- a/src/utilGtk.cs
+++ b/src/utilGtk.cs
@@ -490,8 +490,9 @@ public class UtilGtk
public static string ColorGood = "ForestGreen";
public static string ColorBad = "red";
public static string ColorNothing = "";
+ public static string ColorGray = "gray";
+
-
public static Gdk.Color SELECTED = GetBackgroundColorSelected();
public static bool ColorIsDark(Gdk.Color color)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]