[chronojump] background color can be system color, and color managed on config as static



commit 0c102dbae749be8edafe097559ca36db5d68d9ca
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Sep 1 19:57:30 2020 +0100

    background color can be system color, and color managed on config as static

 glade/app1.glade                      |  32 +++---
 glade/preferences_win.glade           | 180 +++++++++++++++++++++++++++++-----
 src/config.cs                         |   1 +
 src/execute/jump.cs                   |  12 +--
 src/execute/multiChronopic.cs         |   5 +-
 src/execute/pulse.cs                  |   5 +-
 src/execute/reactionTime.cs           |   5 +-
 src/exportSession.cs                  |   2 +-
 src/gui/about.cs                      |  13 ++-
 src/gui/app1/chronojump.cs            |  72 +++++++-------
 src/gui/app1/chronojumpPersons.cs     |  12 +--
 src/gui/app1/encoder.cs               |  13 ++-
 src/gui/app1/forceSensor.cs           |   4 +-
 src/gui/app1/jumpsDjOptimalFall.cs    |   3 +-
 src/gui/app1/jumpsEvolution.cs        |   3 +-
 src/gui/app1/jumpsRjFatigue.cs        |   3 +-
 src/gui/app1/jumpsWeightFVProfile.cs  |   2 +-
 src/gui/app1/menu.cs                  |  18 ++--
 src/gui/app1/menu_tiny.cs             |  18 ++--
 src/gui/app1/runEncoder.cs            |   6 +-
 src/gui/app1/session/backup.cs        |   2 +-
 src/gui/app1/session/export.cs        |   2 +-
 src/gui/cairo/jumpsDjOptimalFall.cs   |   5 +-
 src/gui/cairo/jumpsEvolution.cs       |   5 +-
 src/gui/cairo/jumpsRjFatigue.cs       |   4 +-
 src/gui/cairo/jumpsWeightFVProfile.cs |   5 +-
 src/gui/chronopicRegister.cs          |   5 +-
 src/gui/confirm.cs                    |  34 ++++---
 src/gui/dialogMessage.cs              |   5 +-
 src/gui/dialogPersonPopup.cs          |   7 +-
 src/gui/dialogShortcuts.cs            |   7 +-
 src/gui/dialogThreshold.cs            |  19 ++--
 src/gui/encoderConfiguration.cs       |  26 ++---
 src/gui/encoderSelectRepetitions.cs   |   7 +-
 src/gui/event.cs                      |   8 +-
 src/gui/eventExecute.cs               |   2 +-
 src/gui/forceSensorElasticBands.cs    |   5 +-
 src/gui/forceSensorExercise.cs        |  15 ++-
 src/gui/genericWindow.cs              |  11 ++-
 src/gui/networks.cs                   |   3 +-
 src/gui/overview.cs                   |  15 ++-
 src/gui/person/addModify.cs           |  15 ++-
 src/gui/person/addMultiple.cs         |  11 ++-
 src/gui/person/personSelect.cs        |  13 ++-
 src/gui/person/recuperate.cs          |  43 +++++---
 src/gui/person/showAllEvents.cs       |  17 ++--
 src/gui/preferences.cs                |  60 +++++++++++-
 src/gui/repetitiveConditions.cs       |   5 +-
 src/preferences.cs                    |   2 +-
 49 files changed, 517 insertions(+), 250 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 84771244..75f4a12d 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -24859,6 +24859,9 @@ Concentric</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -27704,18 +27707,6 @@ Concentric</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">6</property>
                                                             <child>
-                                                            <widget class="GtkLabel" 
id="label_video_encoder_tests_will_be_filmed">
-                                                            <property name="can_focus">False</property>
-                                                            <property name="label" translatable="yes">Tests 
will be filmed</property>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="pack_type">end</property>
-                                                            <property name="position">0</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
                                                             <widget class="GtkHBox" 
id="hbox_video_encoder_capturing">
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">4</property>
@@ -27752,6 +27743,18 @@ Concentric</property>
                                                             </packing>
                                                             </child>
                                                             <child>
+                                                            <widget class="GtkLabel" 
id="label_video_encoder_tests_will_be_filmed">
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label" translatable="yes">Tests 
will be filmed</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="pack_type">end</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
                                                             <widget class="GtkHBox" 
id="hbox_video_encoder_no_capturing">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
@@ -35777,6 +35780,9 @@ then click this button.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -39057,7 +39063,7 @@ then click this button.</property>
                                                             <property name="border_width">16</property>
                                                             <property name="spacing">30</property>
                                                             <child>
-                                                            <widget class="GtkNotebook" id="notebook3">
+                                                            <widget class="GtkNotebook" 
id="app1sae_notebook_add_edit">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property name="tab_hborder">10</property>
diff --git a/glade/preferences_win.glade b/glade/preferences_win.glade
index ef1ad42e..c3cc274b 100644
--- a/glade/preferences_win.glade
+++ b/glade/preferences_win.glade
@@ -602,22 +602,38 @@
                           <widget class="GtkVBox" id="vbox9">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="spacing">20</property>
+                            <property name="spacing">16</property>
                             <child>
                               <widget class="GtkHBox" id="hbox72">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
-                                <property name="spacing">30</property>
+                                <property name="spacing">12</property>
                                 <child>
-                                  <widget class="GtkHBox" id="hbox73">
+                                  <widget class="GtkLabel" id="label127">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="spacing">8</property>
+                                    <property name="label" translatable="yes">Background color:</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkHBox" id="hbox49">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="spacing">4</property>
                                     <child>
-                                      <widget class="GtkLabel" id="label127">
+                                      <widget class="GtkRadioButton" id="radio_color_custom">
+                                        <property name="label" translatable="yes">Custom</property>
                                         <property name="visible">True</property>
-                                        <property name="can_focus">False</property>
-                                        <property name="label" translatable="yes">Background color</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">False</property>
+                                        <property name="active">True</property>
+                                        <property name="draw_indicator">True</property>
+                                        <signal name="toggled" handler="on_radio_color_custom_toggled" 
swapped="no"/>
                                       </widget>
                                       <packing>
                                         <property name="expand">False</property>
@@ -626,23 +642,49 @@
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkFrame" id="frame16">
+                                      <widget class="GtkHBox" id="hbox54">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
-                                        <property name="label_xalign">0</property>
-                                        <property name="shadow_type">in</property>
+                                        <property name="spacing">4</property>
                                         <child>
-                                          <widget class="GtkDrawingArea" id="drawingarea_background_color">
-                                            <property name="width_request">40</property>
-                                            <property name="height_request">40</property>
+                                          <widget class="GtkFrame" id="frame16">
                                             <property name="visible">True</property>
                                             <property name="can_focus">False</property>
+                                            <property name="label_xalign">0</property>
+                                            <property name="shadow_type">in</property>
+                                            <child>
+                                              <widget class="GtkDrawingArea" 
id="drawingarea_background_color">
+                                                <property name="width_request">40</property>
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                              </widget>
+                                            </child>
+                                            <child>
+                                              <placeholder/>
+                                              <packing>
+                                                <property name="type">label_item</property>
+                                              </packing>
+                                            </child>
                                           </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">0</property>
+                                          </packing>
                                         </child>
                                         <child>
-                                          <placeholder/>
+                                          <widget class="GtkButton" id="button_color_choose">
+                                            <property name="label" translatable="yes">Choose</property>
+                                            <property name="visible">True</property>
+                                            <property name="sensitive">False</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <signal name="clicked" handler="on_button_color_choose_clicked" 
swapped="no"/>
+                                          </widget>
                                           <packing>
-                                            <property name="type">label_item</property>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">1</property>
                                           </packing>
                                         </child>
                                       </widget>
@@ -652,39 +694,114 @@
                                         <property name="position">1</property>
                                       </packing>
                                     </child>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkHBox" id="hbox73">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="spacing">4</property>
                                     <child>
-                                      <widget class="GtkButton" id="button_color_choose">
-                                        <property name="label" translatable="yes">Choose</property>
+                                      <widget class="GtkRadioButton" id="radio_color_chronojump_blue">
+                                        <property name="label" translatable="yes">Chronojump</property>
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <signal name="clicked" handler="on_button_color_choose_clicked" 
swapped="no"/>
+                                        <property name="receives_default">False</property>
+                                        <property name="active">True</property>
+                                        <property name="draw_indicator">True</property>
+                                        <property name="group">radio_color_custom</property>
+                                        <signal name="toggled" 
handler="on_radio_color_chronojump_blue_toggled" swapped="no"/>
                                       </widget>
                                       <packing>
                                         <property name="expand">False</property>
                                         <property name="fill">False</property>
-                                        <property name="position">2</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkFrame" id="frame11">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label_xalign">0</property>
+                                        <property name="shadow_type">in</property>
+                                        <child>
+                                          <widget class="GtkDrawingArea" 
id="drawingarea_background_color_chronojump_blue">
+                                            <property name="width_request">40</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                          </widget>
+                                        </child>
+                                        <child>
+                                          <placeholder/>
+                                          <packing>
+                                            <property name="type">label_item</property>
+                                          </packing>
+                                        </child>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
                                       </packing>
                                     </child>
                                   </widget>
                                   <packing>
                                     <property name="expand">False</property>
                                     <property name="fill">False</property>
-                                    <property name="position">0</property>
+                                    <property name="position">2</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkCheckButton" id="check_logo_animated">
-                                    <property name="label" translatable="yes">Show animated logo</property>
+                                  <widget class="GtkRadioButton" id="radio_color_os">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">False</property>
+                                    <property name="active">True</property>
                                     <property name="draw_indicator">True</property>
+                                    <property name="group">radio_color_custom</property>
+                                    <signal name="toggled" handler="on_radio_color_os_toggled" swapped="no"/>
+                                    <child>
+                                      <widget class="GtkVBox" id="vbox27">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="spacing">2</property>
+                                        <child>
+                                          <widget class="GtkLabel" id="label1">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="xalign">0</property>
+                                            <property name="label" translatable="yes">System color</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkLabel" id="label_radio_color_os_needs_restart">
+                                            <property name="can_focus">False</property>
+                                            <property name="xalign">0</property>
+                                            <property name="label" translatable="yes">(needs 
restart)</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                      </widget>
+                                    </child>
                                   </widget>
                                   <packing>
                                     <property name="expand">False</property>
                                     <property name="fill">False</property>
-                                    <property name="position">1</property>
+                                    <property name="position">3</property>
                                   </packing>
                                 </child>
                               </widget>
@@ -736,6 +853,21 @@
                                 <property name="position">1</property>
                               </packing>
                             </child>
+                            <child>
+                              <widget class="GtkCheckButton" id="check_logo_animated">
+                                <property name="label" translatable="yes">Show animated logo</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="active">True</property>
+                                <property name="draw_indicator">True</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
                           </widget>
                           <packing>
                             <property name="expand">False</property>
diff --git a/src/config.cs b/src/config.cs
index de959711..41eddc78 100644
--- a/src/config.cs
+++ b/src/config.cs
@@ -25,6 +25,7 @@ using System.IO;
 public class Config
 {
        //to avoid passing this info to all the windows and dialogs, just read it here
+       public static bool UseSystemColor; //do nothing at all
        public static Gdk.Color ColorBackground;
        public static bool ColorBackgroundIsDark;
 
diff --git a/src/execute/jump.cs b/src/execute/jump.cs
index b6792ebd..e4d2c75c 100644
--- a/src/execute/jump.cs
+++ b/src/execute/jump.cs
@@ -60,7 +60,7 @@ public class JumpExecute : EventExecute
                        bool volumeOn, Preferences.GstreamerTypes gstreamer,
                        double progressbarLimit, ExecutingGraphData egd, string description,
                        bool avoidGraph, //on configChronojump.Exhibition do not show graph because it gets 
too slow with big database
-                       bool heightPreferred, int graphLimit, bool graphAllTypes, bool graphAllPersons, 
Gdk.Color colorBackground
+                       bool heightPreferred, int graphLimit, bool graphAllTypes, bool graphAllPersons
                        )
        {
                this.personID = personID;
@@ -84,7 +84,6 @@ public class JumpExecute : EventExecute
                this.graphLimit = graphLimit;
                this.graphAllTypes = graphAllTypes;
                this.graphAllPersons = graphAllPersons;
-               this.colorBackground = colorBackground;
        
                if(TypeHasFall) {
                        hasFall = true;
@@ -167,7 +166,7 @@ public class JumpExecute : EventExecute
                        ConfirmWindow confirmWin;               
                        confirmWin = ConfirmWindow.Show(Catalog.GetString(
                                                "You are OUT, please enter the platform, prepare for jump and 
press the 'accept' button"),
-                                       "", "", colorBackground);
+                                       "", "");
 
                        Util.PlaySound(Constants.SoundTypes.BAD, volumeOn, gstreamer);
 
@@ -256,7 +255,7 @@ public class JumpExecute : EventExecute
                        if(fall == -1)
                                message = Catalog.GetString("You are OUT, please enter the platform, prepare 
for jump and press the 'accept' button");
 
-                       confirmWin = ConfirmWindow.Show(message, "", "", colorBackground);
+                       confirmWin = ConfirmWindow.Show(message, "", "");
 
                        Util.PlaySound(Constants.SoundTypes.BAD, volumeOn, gstreamer);
 
@@ -566,7 +565,7 @@ public class JumpRjExecute : JumpExecute
                        Chronopic cp, Gtk.Window app, int pDN, bool allowFinishAfterTime,
                        bool volumeOn, Preferences.GstreamerTypes gstreamer,
                        RepetitiveConditionsWindow repetitiveConditionsWin,
-                       double progressbarLimit, ExecutingGraphData egd, Gdk.Color colorBackground
+                       double progressbarLimit, ExecutingGraphData egd
                        )
        {
                this.personID = personID;
@@ -594,7 +593,6 @@ public class JumpRjExecute : JumpExecute
                this.repetitiveConditionsWin = repetitiveConditionsWin;
                this.progressbarLimit = progressbarLimit;
                this.egd = egd;
-               this.colorBackground = colorBackground;
        
                if(TypeHasFall) { hasFall = true; } 
                else { hasFall = false; }
@@ -654,7 +652,7 @@ public class JumpRjExecute : JumpExecute
                                myMessage = Catalog.GetString("You are OUT, please enter the platform, 
prepare for jump and press the 'accept' button");
                        }
                        ConfirmWindow confirmWin;               
-                       confirmWin = ConfirmWindow.Show(myMessage, "","", colorBackground);
+                       confirmWin = ConfirmWindow.Show(myMessage, "","");
                        Util.PlaySound(Constants.SoundTypes.BAD, volumeOn, gstreamer);
 
                        //we call again this function
diff --git a/src/execute/multiChronopic.cs b/src/execute/multiChronopic.cs
index 8155129e..f95254bd 100644
--- a/src/execute/multiChronopic.cs
+++ b/src/execute/multiChronopic.cs
@@ -76,7 +76,7 @@ public class MultiChronopicExecute : EventExecute
        public MultiChronopicExecute(int personID, string personName, int sessionID, string type, 
                        Chronopic cp, bool syncFirst, bool deleteFirst, string vars, Gtk.Window app,
                        //double progressbarLimit, 
-                       ExecutingGraphData egd, Gdk.Color colorBackground
+                       ExecutingGraphData egd
                        ) {
                this.personID = personID;
                this.personName = personName;
@@ -91,7 +91,6 @@ public class MultiChronopicExecute : EventExecute
                this.app = app;
 //             this.progressbarLimit = progressbarLimit;
                this.egd = egd;
-               this.colorBackground = colorBackground;
        
                chronopics = 1; 
                initValues();   
@@ -302,7 +301,7 @@ public class MultiChronopicExecute : EventExecute
                        ConfirmWindow confirmWin;               
                        confirmWin = ConfirmWindow.Show( 
                                        string.Format(Catalog.GetString("There's contact in {0}. Please 
leave."), platformsProblems),
-                                       "", "", colorBackground);
+                                       "", "");
 
                        Util.PlaySound(Constants.SoundTypes.BAD, volumeOn, gstreamer);
 
diff --git a/src/execute/pulse.cs b/src/execute/pulse.cs
index 2e0311f3..1d368491 100644
--- a/src/execute/pulse.cs
+++ b/src/execute/pulse.cs
@@ -57,7 +57,7 @@ public class PulseExecute : EventExecute
                        Chronopic cp, Gtk.Window app, int pDN,
                        bool volumeOn, Preferences.GstreamerTypes gstreamer,
                        //double progressbarLimit, 
-                       ExecutingGraphData egd, Gdk.Color colorBackground
+                       ExecutingGraphData egd
                        )
        {
                this.personID = personID;
@@ -66,7 +66,6 @@ public class PulseExecute : EventExecute
                this.type = type;
                this.fixedPulse = fixedPulse;
                this.totalPulsesNum = totalPulsesNum;
-               this.colorBackground = colorBackground;
                
        
                this.cp = cp;
@@ -129,7 +128,7 @@ public class PulseExecute : EventExecute
                        string myMessage = Catalog.GetString("You are IN, please leave the platform, prepare 
for start, and press the 'accept' button!");
 
                        ConfirmWindow confirmWin;               
-                       confirmWin = ConfirmWindow.Show(myMessage, "", "", colorBackground);
+                       confirmWin = ConfirmWindow.Show(myMessage, "", "");
                        Util.PlaySound(Constants.SoundTypes.BAD, volumeOn, gstreamer);
 
                        //we call again this function
diff --git a/src/execute/reactionTime.cs b/src/execute/reactionTime.cs
index 97950c05..fb921005 100644
--- a/src/execute/reactionTime.cs
+++ b/src/execute/reactionTime.cs
@@ -41,7 +41,7 @@ public class ReactionTimeExecute : EventExecute
        public ReactionTimeExecute(int personID, string personName, int sessionID, string type,
                        Chronopic cp, Gtk.Window app, int pDN,
                        bool volumeOn, Preferences.GstreamerTypes gstreamer,
-                       double progressbarLimit, ExecutingGraphData egd, string description, Gdk.Color 
colorBackground
+                       double progressbarLimit, ExecutingGraphData egd, string description
                        )
        {
                this.personID = personID;
@@ -58,7 +58,6 @@ public class ReactionTimeExecute : EventExecute
                this.progressbarLimit = progressbarLimit;
                this.egd = egd;
                this.description = description;
-               this.colorBackground = colorBackground;
        
                fakeButtonUpdateGraph = new Gtk.Button();
                fakeButtonThreadDyed = new Gtk.Button();
@@ -145,7 +144,7 @@ public class ReactionTimeExecute : EventExecute
                {
                        ConfirmWindow confirmWin;               
                        confirmWin = ConfirmWindow.Show( 
-                                       Catalog.GetString("You are OUT, come inside and press the 'accept' 
button"), "", "", colorBackground); //TODO:change this
+                                       Catalog.GetString("You are OUT, come inside and press the 'accept' 
button"), "", ""); //TODO:change this
                        //System.Media.SystemSounds.Beep.Play();
                        Util.PlaySound(Constants.SoundTypes.BAD, volumeOn, gstreamer);
 
diff --git a/src/exportSession.cs b/src/exportSession.cs
index 3ef5e9aa..414e6b77 100644
--- a/src/exportSession.cs
+++ b/src/exportSession.cs
@@ -104,7 +104,7 @@ public class ExportSession
                                                        fileName, File.GetAttributes(fileName), 
File.GetCreationTime(fileName)));
                                LogB.Information("Overwrite...");
                                ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString("Are you sure 
you want to overwrite file: "),
-                                               "", fileName, preferences.colorBackground);
+                                               "", fileName);
                                confirmWin.Button_accept.Clicked += new 
EventHandler(on_overwrite_file_accepted);
                        } else {
                                writeFile();
diff --git a/src/gui/about.cs b/src/gui/about.cs
index 0341dec1..02348ab7 100644
--- a/src/gui/about.cs
+++ b/src/gui/about.cs
@@ -38,7 +38,7 @@ public class About
        [Widget] Gtk.Label dialog_about_label_documenters;
        [Widget] Gtk.Label dialog_about_label_translators;
 
-       public About (string version, string translators, Gdk.Color colorBackground)
+       public About (string version, string translators)
        {
                Glade.XML gladeXML;
                gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "dialog_about.glade", 
"dialog_about", "chronojump");
@@ -65,9 +65,14 @@ public class About
 
                //white bg
                //dialog_about.ModifyBg(StateType.Normal, new Gdk.Color(0xff,0xff,0xff));
-               UtilGtk.DialogColor(dialog_about, colorBackground);
-               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), 
dialog_about_label_chronojump);
-               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), dialog_about_label_version);
+
+               //manage window color
+               if(! Config.UseSystemColor)
+               {
+                       UtilGtk.DialogColor(dialog_about, Config.ColorBackground);
+                       UtilGtk.ContrastLabelsLabel(Config.ColorBackgroundIsDark, 
dialog_about_label_chronojump);
+                       UtilGtk.ContrastLabelsLabel(Config.ColorBackgroundIsDark, dialog_about_label_version);
+               }
                
                //put authors
                textLabel(Constants.Authors(Constants.AuthorsEnum.SOFTWARE), 
dialog_about_label_developers_software);
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 8cf30a9a..9540f876 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -553,6 +553,7 @@ public partial class ChronoJumpWindow
                //at initialization of chronojump and gives problems if this signals are raised while 
preferences are loading
                loadPreferencesAtStart ();
 
+               Config.UseSystemColor = (preferences.colorBackgroundString == "");
                Config.ColorBackground = preferences.colorBackground;
                Config.ColorBackgroundIsDark = UtilGtk.ColorIsDark(preferences.colorBackground);
 
@@ -787,12 +788,15 @@ public partial class ChronoJumpWindow
        {
                if(personsAtTop)
                {
-                       UtilGtk.ContrastLabelsHBox (preferences.colorBackgroundIsDark, hbox_top_person);
-                       UtilGtk.ContrastLabelsHBox (preferences.colorBackgroundIsDark, 
hbox_top_person_encoder);
-                       UtilGtk.ContrastLabelsTable (preferences.colorBackgroundIsDark, 
table_rest_time_contacts);
-                       UtilGtk.ContrastLabelsTable (preferences.colorBackgroundIsDark, 
table_rest_time_encoder);
+                       if(! Config.UseSystemColor)
+                       {
+                               UtilGtk.ContrastLabelsHBox (Config.ColorBackgroundIsDark, hbox_top_person);
+                               UtilGtk.ContrastLabelsHBox (Config.ColorBackgroundIsDark, 
hbox_top_person_encoder);
+                               UtilGtk.ContrastLabelsTable (Config.ColorBackgroundIsDark, 
table_rest_time_contacts);
+                               UtilGtk.ContrastLabelsTable (Config.ColorBackgroundIsDark, 
table_rest_time_encoder);
+                       }
 
-                       if(preferences.colorBackgroundIsDark)
+                       if(! Config.UseSystemColor && Config.ColorBackgroundIsDark)
                        {
                                image_contacts_rest_time_dark_blue.Visible = false;
                                image_contacts_rest_time_clear_yellow.Visible = true;
@@ -806,10 +810,14 @@ public partial class ChronoJumpWindow
                        }
                }
 
-               UtilGtk.ContrastLabelsNotebook (preferences.colorBackgroundIsDark, app1s_notebook);
-               UtilGtk.ContrastLabelsVBox (preferences.colorBackgroundIsDark, vbox_help);
+               if(! Config.UseSystemColor)
+               {
+                       UtilGtk.ContrastLabelsNotebook (Config.ColorBackgroundIsDark, app1s_notebook);
+                       UtilGtk.ContrastLabelsVBox (Config.ColorBackgroundIsDark, vbox_help);
+               }
 
-               if(preferences.colorBackgroundIsDark)
+               LogB.Information(string.Format("UseSystemColor: {0}, ColorBackgroundIsDark: {1}", 
Config.UseSystemColor, Config.ColorBackgroundIsDark));
+               if(! Config.UseSystemColor && Config.ColorBackgroundIsDark)
                {
                        image_session_new_blue.Visible = false;
                        image_session_load3_blue.Visible = false;
@@ -2846,14 +2854,16 @@ public partial class ChronoJumpWindow
                if(pen_black_force_ai != null)
                        pen_black_force_ai.SetLineAttributes (preferences.forceSensorGraphsLineWidth, 
Gdk.LineStyle.Solid, Gdk.CapStyle.Round, Gdk.JoinStyle.Round);
 
-               //TODO: only if personWinHide changed
-               initialize_menu_or_menu_tiny();
+               Config.ColorBackground = preferences.colorBackground;
+               Config.ColorBackgroundIsDark = UtilGtk.ColorIsDark(preferences.colorBackground);
 
                //repaint labels that are on the background
                //TODO: only if color changed or personWinHide
-               doLabelsContrast(configChronojump.PersonWinHide);
-               Config.ColorBackground = preferences.colorBackground;
-               Config.ColorBackgroundIsDark = UtilGtk.ColorIsDark(preferences.colorBackground);
+               Config.UseSystemColor = (preferences.colorBackgroundString == "");
+                       doLabelsContrast(configChronojump.PersonWinHide);
+
+               //TODO: only if personWinHide changed
+               initialize_menu_or_menu_tiny();
 
                // update force_capture_drawingarea
                if(current_menuitem_mode == Constants.Menuitem_modes.FORCESENSOR && 
radiobutton_force_sensor_analyze_manual.Active)
@@ -4131,8 +4141,7 @@ public partial class ChronoJumpWindow
                                progressbarLimit, egd, description, configChronojump.Exhibition,
                                preferences.heightPreferred,
                                Convert.ToInt32(spin_contacts_graph_last_limit.Value),
-                               radio_contacts_graph_allTests.Active, radio_contacts_graph_allPersons.Active,
-                               preferences.colorBackground);
+                               radio_contacts_graph_allTests.Active, radio_contacts_graph_allPersons.Active);
 
 
                //UtilGtk.ChronopicColors(viewport_chronopics, label_chronopics, label_connected_chronopics, 
chronopicWin.Connected);
@@ -4446,8 +4455,7 @@ public partial class ChronoJumpWindow
                                cp2016.CP, app1, preferences.digitsNumber,
                                checkbutton_allow_finish_rj_after_time.Active,
                                preferences.volumeOn, preferences.gstreamer,
-                               repetitiveConditionsWin, progressbarLimit, egd,
-                               preferences.colorBackground);
+                               repetitiveConditionsWin, progressbarLimit, egd);
                
                //suitable for limited by jump and time
                //simulated always simulate limited by jumps
@@ -4967,8 +4975,7 @@ public partial class ChronoJumpWindow
                                currentSession.UniqueID, currentReactionTimeType.Name, 
                                cp2016.CP, app1, preferences.digitsNumber,
                                preferences.volumeOn, preferences.gstreamer,
-                               progressbarLimit, egd, description, preferences.colorBackground
-                               );
+                               progressbarLimit, egd, description);
 
                if (! canCaptureC)
                        currentEventExecute.SimulateInitValues(rand);
@@ -5128,8 +5135,7 @@ public partial class ChronoJumpWindow
                                currentSession.UniqueID, currentPulseType.Name, pulseStep, totalPulses, 
                                cp2016.CP,
                                app1, preferences.digitsNumber,
-                               preferences.volumeOn, preferences.gstreamer, egd, preferences.colorBackground
-                               );
+                               preferences.volumeOn, preferences.gstreamer, egd);
                
                if(! canCaptureC)
                        currentEventExecute.SimulateInitValues(rand);
@@ -5923,8 +5929,7 @@ LogB.Debug("mc finished 5");
                if (myTreeViewJumps.EventSelectedID > 0) {
                        //3.- display confirmwindow of deletion 
                        if (preferences.askDeletion) {
-                               confirmWinJumpRun = ConfirmWindowJumpRun.Show(Catalog.GetString("Do you want 
to delete this jump?"),
-                                               "", preferences.colorBackground);
+                               confirmWinJumpRun = ConfirmWindowJumpRun.Show(Catalog.GetString("Do you want 
to delete this jump?"), "");
                                confirmWinJumpRun.Button_accept.Clicked += new 
EventHandler(on_delete_selected_jump_accepted);
                        } else {
                                on_delete_selected_jump_accepted(o, args);
@@ -5940,8 +5945,7 @@ LogB.Debug("mc finished 5");
                if (myTreeViewJumpsRj.EventSelectedID > 0) {
                        //3.- display confirmwindow of deletion 
                        if (preferences.askDeletion) {
-                               confirmWinJumpRun = ConfirmWindowJumpRun.Show( Catalog.GetString("Do you want 
to delete this jump?"),
-                                               "", preferences.colorBackground);
+                               confirmWinJumpRun = ConfirmWindowJumpRun.Show( Catalog.GetString("Do you want 
to delete this jump?"), "");
                                confirmWinJumpRun.Button_accept.Clicked += new 
EventHandler(on_delete_selected_jump_rj_accepted);
                        } else {
                                on_delete_selected_jump_rj_accepted(o, args);
@@ -6015,8 +6019,7 @@ LogB.Debug("mc finished 5");
                if (myTreeViewRuns.EventSelectedID > 0) {
                        //3.- display confirmwindow of deletion 
                        if (preferences.askDeletion) {
-                               confirmWinJumpRun = ConfirmWindowJumpRun.Show(Catalog.GetString("Do you want 
to delete this race?"),
-                                               "", preferences.colorBackground);
+                               confirmWinJumpRun = ConfirmWindowJumpRun.Show(Catalog.GetString("Do you want 
to delete this race?"), "");
                                confirmWinJumpRun.Button_accept.Clicked += new 
EventHandler(on_delete_selected_run_accepted);
                        } else {
                                on_delete_selected_run_accepted(o, args);
@@ -6034,7 +6037,7 @@ LogB.Debug("mc finished 5");
                        //3.- display confirmwindow of deletion 
                        if (preferences.askDeletion) {
                                confirmWinJumpRun = ConfirmWindowJumpRun.Show(
-                                               Catalog.GetString("Do you want to delete this race?"), "", 
preferences.colorBackground);
+                                               Catalog.GetString("Do you want to delete this race?"), "");
                                confirmWinJumpRun.Button_accept.Clicked += new 
EventHandler(on_delete_selected_run_interval_accepted);
                        } else {
                                on_delete_selected_run_interval_accepted(o, args);
@@ -6098,7 +6101,7 @@ LogB.Debug("mc finished 5");
                if (myTreeViewReactionTimes.EventSelectedID > 0) {
                        //3.- display confirmwindow of deletion 
                        if (preferences.askDeletion) {
-                               confirmWinJumpRun = ConfirmWindowJumpRun.Show("Do you want to delete this 
test?", "", preferences.colorBackground);
+                               confirmWinJumpRun = ConfirmWindowJumpRun.Show("Do you want to delete this 
test?", "");
                                confirmWinJumpRun.Button_accept.Clicked += new 
EventHandler(on_delete_selected_reaction_time_accepted);
                        } else {
                                on_delete_selected_reaction_time_accepted(o, args);
@@ -6137,7 +6140,7 @@ LogB.Debug("mc finished 5");
                if (myTreeViewPulses.EventSelectedID > 0) {
                        //3.- display confirmwindow of deletion 
                        if (preferences.askDeletion) {
-                               confirmWinJumpRun = ConfirmWindowJumpRun.Show("Do you want to delete this 
test?", "", preferences.colorBackground);
+                               confirmWinJumpRun = ConfirmWindowJumpRun.Show("Do you want to delete this 
test?", "");
                                confirmWinJumpRun.Button_accept.Clicked += new 
EventHandler(on_delete_selected_pulse_accepted);
                        } else {
                                on_delete_selected_pulse_accepted(o, args);
@@ -6172,8 +6175,7 @@ LogB.Debug("mc finished 5");
                if (myTreeViewMultiChronopic.EventSelectedID > 0) {
                        //3.- display confirmwindow of deletion 
                        if (preferences.askDeletion) {
-                               confirmWinJumpRun = ConfirmWindowJumpRun.Show( Catalog.GetString("Do you want 
to delete this test?"),
-                                               "", preferences.colorBackground);
+                               confirmWinJumpRun = ConfirmWindowJumpRun.Show( Catalog.GetString("Do you want 
to delete this test?"), "");
                                confirmWinJumpRun.Button_accept.Clicked += new 
EventHandler(on_delete_selected_multi_chronopic_accepted);
                        } else {
                                on_delete_selected_multi_chronopic_accepted(o, args);
@@ -6701,7 +6703,7 @@ LogB.Debug("mc finished 5");
 
        private void on_shortcuts_clicked (object o, EventArgs args)
        {
-               new DialogShortcuts(operatingSystem == UtilAll.OperatingSystems.MACOSX, 
preferences.colorBackground);
+               new DialogShortcuts(operatingSystem == UtilAll.OperatingSystems.MACOSX);
        }
 
        private void on_menuitem_check_last_version_activate (object o, EventArgs args) 
@@ -6879,7 +6881,7 @@ LogB.Debug("mc finished 5");
                if(translator_credits == "translator-credits") 
                        translator_credits = "";
 
-               new About(progVersion, translator_credits, preferences.colorBackground);
+               new About(progVersion, translator_credits);
        }
 
        private void on_repetitive_conditions_closed(object o, EventArgs args)
@@ -7628,7 +7630,7 @@ LogB.Debug("mc finished 5");
                bool voluntaryCrashAllowed = true;
                if(voluntaryCrashAllowed) {
                        ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString("Done for testing 
purposes. Chronojump will exit badly"),
-                                       "", "Are you sure you want to crash application?", 
preferences.colorBackground);
+                                       "", "Are you sure you want to crash application?");
                        confirmWin.Button_accept.Clicked += new EventHandler(crashing);
                } else {
                        new DialogMessage(Constants.MessageTypes.INFO, "Currently disabled.");
diff --git a/src/gui/app1/chronojumpPersons.cs b/src/gui/app1/chronojumpPersons.cs
index 3eba1ef7..1cf19f7c 100644
--- a/src/gui/app1/chronojumpPersons.cs
+++ b/src/gui/app1/chronojumpPersons.cs
@@ -104,7 +104,7 @@ public partial class ChronoJumpWindow
        private void person_load_single ()
        {
                LogB.Information("recuperate person");
-               personRecuperateWin = PersonRecuperateWindow.Show(app1, currentSession, 
preferences.digitsNumber, preferences.colorBackground);
+               personRecuperateWin = PersonRecuperateWindow.Show(app1, currentSession, 
preferences.digitsNumber);
                personRecuperateWin.FakeButtonDone.Clicked += new EventHandler(on_recuperate_person_accepted);
        }
 
@@ -138,7 +138,7 @@ public partial class ChronoJumpWindow
 
        private void person_load_multiple () {
                LogB.Information("recuperate persons from other session");
-               personsRecuperateFromOtherSessionWin = PersonsRecuperateFromOtherSessionWindow.Show(app1, 
currentSession, preferences.colorBackground);
+               personsRecuperateFromOtherSessionWin = PersonsRecuperateFromOtherSessionWindow.Show(app1, 
currentSession);
                personsRecuperateFromOtherSessionWin.FakeButtonDone.Clicked += new 
EventHandler(on_recuperate_persons_from_session_accepted);
        }
        
@@ -176,7 +176,7 @@ public partial class ChronoJumpWindow
                                //preferences.digitsNumber, checkbutton_video, configChronojump.UseVideo,
                                preferences.digitsNumber, checkbutton_video_contacts,
                                preferences.videoDevice, preferences.videoDevicePixelFormat, 
preferences.videoDeviceResolution, preferences.videoDeviceFramerate,
-                               configChronojump.Compujump, preferences.units == 
Preferences.UnitsEnum.METRIC, preferences.colorBackground
+                               configChronojump.Compujump, preferences.units == Preferences.UnitsEnum.METRIC
                                );
                //-1 means we are adding a new person
                //if we were modifying it will be it's uniqueID
@@ -262,7 +262,7 @@ public partial class ChronoJumpWindow
 
        private void person_add_multiple ()
        {
-               personAddMultipleWin = PersonAddMultipleWindow.Show(app1, currentSession, 
preferences.CSVColumnDelimiter, preferences.colorBackground);
+               personAddMultipleWin = PersonAddMultipleWindow.Show(app1, currentSession, 
preferences.CSVColumnDelimiter);
                personAddMultipleWin.Button_accept.Clicked -= new 
EventHandler(on_person_add_multiple_accepted);
                personAddMultipleWin.Button_accept.Clicked += new 
EventHandler(on_person_add_multiple_accepted);
        }
@@ -309,7 +309,7 @@ public partial class ChronoJumpWindow
                                //preferences.digitsNumber, checkbutton_video, configChronojump.UseVideo,
                                preferences.digitsNumber, checkbutton_video_contacts,
                                preferences.videoDevice, preferences.videoDevicePixelFormat, 
preferences.videoDeviceResolution, preferences.videoDeviceFramerate,
-                               configChronojump.Compujump, preferences.units == 
Preferences.UnitsEnum.METRIC, preferences.colorBackground
+                               configChronojump.Compujump, preferences.units == Preferences.UnitsEnum.METRIC
                                ); 
                personAddModifyWin.FakeButtonAccept.Clicked += new 
EventHandler(on_edit_current_person_accepted);
        }
@@ -368,7 +368,7 @@ public partial class ChronoJumpWindow
                LogB.Information("delete current person from this session");
                ConfirmWindow confirmWin = ConfirmWindow.Show(
                                Catalog.GetString("Are you sure you want to delete the current person and all 
his/her tests (jumps, races, pulses, ...) from this session?\n(His/her personal data and tests in other 
sessions will remain intact.)"), "",
-                               Catalog.GetString("Current Person: ") + "<b>" + currentPerson.Name + "</b>", 
preferences.colorBackground);
+                               Catalog.GetString("Current Person: ") + "<b>" + currentPerson.Name + "</b>");
 
                confirmWin.Button_accept.Clicked += new 
EventHandler(on_delete_current_person_from_session_accepted);
        }
diff --git a/src/gui/app1/encoder.cs b/src/gui/app1/encoder.cs
index 9e21f1e5..c14546d2 100644
--- a/src/gui/app1/encoder.cs
+++ b/src/gui/app1/encoder.cs
@@ -515,8 +515,7 @@ public partial class ChronoJumpWindow
        {
                encoder_configuration_win = EncoderConfigurationWindow.View(
                                currentEncoderGI, SqliteEncoderConfiguration.SelectActive(currentEncoderGI),
-                               UtilGtk.ComboGetActive(combo_encoder_anchorage), (int) 
spin_encoder_im_weights_n.Value, //used on inertial
-                               preferences.colorBackground);
+                               UtilGtk.ComboGetActive(combo_encoder_anchorage), (int) 
spin_encoder_im_weights_n.Value); //used on inertial
 
                encoder_configuration_win.Button_close.Clicked += new 
EventHandler(on_encoder_configuration_win_closed);
 
@@ -1277,7 +1276,7 @@ public partial class ChronoJumpWindow
                {
                        ConfirmWindow confirmWin = ConfirmWindow.Show(
                                        Catalog.GetString("Recalculate this set will remove existing 
triggers."),
-                                       Catalog.GetString("Are you sure!"), "", preferences.colorBackground);
+                                       Catalog.GetString("Are you sure!"), "");
                        confirmWin.Button_accept.Clicked += new 
EventHandler(on_button_encoder_recalculate_clicked_do);
                }
                else
@@ -1523,7 +1522,7 @@ public partial class ChronoJumpWindow
                if(radio_encoder_analyze_individual_current_session.Active) 
                {
                        if(encSelReps == null || encSelReps.Type != 
EncoderSelectRepetitions.Types.INDIVIDUAL_CURRENT_SESSION)
-                               encSelReps = new 
EncoderSelectRepetitionsIndividualCurrentSession(preferences.colorBackground);
+                               encSelReps = new EncoderSelectRepetitionsIndividualCurrentSession();
 
                        encSelReps.FakeButtonDeleteCurve.Clicked -= new EventHandler(on_delete_encoder_curve);
                        encSelReps.FakeButtonDeleteCurve.Clicked += new EventHandler(on_delete_encoder_curve);
@@ -1876,7 +1875,7 @@ public partial class ChronoJumpWindow
        {
                if(preferences.askDeletion) {
                        ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString(
-                                               "Are you sure you want to delete this set?"), 
Catalog.GetString("Saved repetitions related to this set will also be deleted."), "", 
preferences.colorBackground);
+                                               "Are you sure you want to delete this set?"), 
Catalog.GetString("Saved repetitions related to this set will also be deleted."), "");
                        confirmWin.Button_accept.Clicked += new 
EventHandler(on_encoder_load_signal_row_delete);
                } else
                        on_encoder_load_signal_row_delete (o, args);
@@ -2187,7 +2186,7 @@ public partial class ChronoJumpWindow
                                        LogB.Information("Overwrite...");
                                        ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString(
                                                                "Are you sure you want to overwrite file: "), 
"", 
-                                                       exportFileName, preferences.colorBackground);
+                                                       exportFileName);
 
                                        if(checkFileOp == Constants.CheckFileOp.JUMPS_PROFILE_SAVE_IMAGE)
                                                confirmWin.Button_accept.Clicked +=
@@ -2338,7 +2337,7 @@ public partial class ChronoJumpWindow
        {
                if(preferences.askDeletion) {
                        ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString(
-                                               "Are you sure you want to delete this set?"), 
Catalog.GetString("Saved repetitions related to this set will also be deleted."), "", 
preferences.colorBackground);
+                                               "Are you sure you want to delete this set?"), 
Catalog.GetString("Saved repetitions related to this set will also be deleted."), "");
                        confirmWin.Button_accept.Clicked += new 
EventHandler(on_button_encoder_delete_signal_accepted);
                } else
                        on_button_encoder_delete_signal_accepted (o, args);
diff --git a/src/gui/app1/forceSensor.cs b/src/gui/app1/forceSensor.cs
index dc66608b..c069caf1 100644
--- a/src/gui/app1/forceSensor.cs
+++ b/src/gui/app1/forceSensor.cs
@@ -1877,7 +1877,7 @@ LogB.Information(" fs R ");
        {
                if(preferences.askDeletion) {
                        ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString(
-                                               "Are you sure you want to delete this set?"), "", "", 
preferences.colorBackground);
+                                               "Are you sure you want to delete this set?"), "", "");
                        confirmWin.Button_accept.Clicked += new 
EventHandler(on_force_sensor_load_signal_row_delete);
                } else
                        on_force_sensor_load_signal_row_delete (o, args);
@@ -1913,7 +1913,7 @@ LogB.Information(" fs R ");
 
                if(preferences.askDeletion) {
                        ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString(
-                                               "Are you sure you want to delete this set?"), "", "", 
preferences.colorBackground);
+                                               "Are you sure you want to delete this set?"), "", "");
                        confirmWin.Button_accept.Clicked += new 
EventHandler(force_sensor_delete_current_test_accepted);
                } else
                        force_sensor_delete_current_test_accepted(new object(), new EventArgs());
diff --git a/src/gui/app1/jumpsDjOptimalFall.cs b/src/gui/app1/jumpsDjOptimalFall.cs
index 867a5320..75d538dd 100644
--- a/src/gui/app1/jumpsDjOptimalFall.cs
+++ b/src/gui/app1/jumpsDjOptimalFall.cs
@@ -97,8 +97,7 @@ public partial class ChronoJumpWindow
                                        jumpsDjOptimalFall.XatMaxY, //model
                                        jumpsDjOptimalFall.GetMaxValue(),
                                        drawingarea_jumps_dj_optimal_fall,
-                                       currentPerson.Name, jumpType, currentSession.DateShort,
-                                       preferences.colorBackground);
+                                       currentPerson.Name, jumpType, currentSession.DateShort);
                        jumpsDjOptimalFallGraph.Do();
 
                        button_jumps_dj_optimal_fall_save_image.Sensitive = true;
diff --git a/src/gui/app1/jumpsEvolution.cs b/src/gui/app1/jumpsEvolution.cs
index b7aa0d01..f510d835 100644
--- a/src/gui/app1/jumpsEvolution.cs
+++ b/src/gui/app1/jumpsEvolution.cs
@@ -104,8 +104,7 @@ public partial class ChronoJumpWindow
                                        jumpsEvolution.Slope,
                                        jumpsEvolution.Intercept,
                                        drawingarea_jumps_evolution,
-                                       currentPerson.Name, jumpType, currentSession.DateShort,
-                                       preferences.colorBackground);
+                                       currentPerson.Name, jumpType, currentSession.DateShort);
                        jumpsEvolutionGraph.Do();
 
                        button_jumps_evolution_save_image.Sensitive = true;
diff --git a/src/gui/app1/jumpsRjFatigue.cs b/src/gui/app1/jumpsRjFatigue.cs
index c0fbb307..612f29e8 100644
--- a/src/gui/app1/jumpsRjFatigue.cs
+++ b/src/gui/app1/jumpsRjFatigue.cs
@@ -190,8 +190,7 @@ public partial class ChronoJumpWindow
                                        currentPerson.Name, jumpType,
                                        jumpDateStr,
                                        radio_jumps_rj_fatigue_heights.Active,
-                                       divideIn,
-                                       preferences.colorBackground);
+                                       divideIn);
                        jumpsRjFatigueGraph.Do();
 
                        button_jumps_rj_fatigue_save_image.Sensitive = true;
diff --git a/src/gui/app1/jumpsWeightFVProfile.cs b/src/gui/app1/jumpsWeightFVProfile.cs
index bfdef522..afedec29 100644
--- a/src/gui/app1/jumpsWeightFVProfile.cs
+++ b/src/gui/app1/jumpsWeightFVProfile.cs
@@ -132,7 +132,7 @@ public partial class ChronoJumpWindow
                                        currentPerson.Name, //jumpType,
                                        currentSession.DateShort,
                                        radio_jumps_weight_fv_profile_show_full_graph.Active,
-                                       errorAtStart, preferences.colorBackground);
+                                       errorAtStart);
                        jumpsWeightFVProfileGraph.Do();
 
                        button_jumps_weight_fv_profile_save_image.Sensitive = true;
diff --git a/src/gui/app1/menu.cs b/src/gui/app1/menu.cs
index a63137a8..8de6b581 100644
--- a/src/gui/app1/menu.cs
+++ b/src/gui/app1/menu.cs
@@ -176,7 +176,7 @@ public partial class ChronoJumpWindow
 
                viewport_menu_top.SetSizeRequest(maxWidth, -1); //-1 is height
 
-               if(UtilGtk.ColorIsOkWithLogoTransparent 
(UtilGtk.ColorParse(preferences.colorBackgroundString)))
+               if(! Config.UseSystemColor && UtilGtk.ColorIsOkWithLogoTransparent 
(UtilGtk.ColorParse(preferences.colorBackgroundString)))
                {
                        image_logo_contacts.Visible = false;
                        image_logo_contacts_transp.Visible = true;
@@ -223,13 +223,17 @@ public partial class ChronoJumpWindow
                //Gdk.Color color = UtilGtk.BLUE_CHRONOJUMP;
                //Gdk.Color color = //#FFE891 //this is nice
 
-               Gdk.Color color = UtilGtk.ColorParse(preferences.colorBackgroundString);
+               if(! Config.UseSystemColor)
+               {
+                       Gdk.Color color = UtilGtk.ColorParse(preferences.colorBackgroundString);
+
+                       UtilGtk.WindowColor(app1, color);
+                       UtilGtk.ViewportColor(viewport_send_log, color);
+                       UtilGtk.ViewportColor(viewport_exit_confirm, color);
+                       UtilGtk.ViewportColor(viewport_menu_top, color);
+                       UtilGtk.ViewportColor(viewport_menu, color);
+               }
 
-               UtilGtk.WindowColor(app1, color);
-               UtilGtk.ViewportColor(viewport_send_log, color);
-               UtilGtk.ViewportColor(viewport_exit_confirm, color);
-               UtilGtk.ViewportColor(viewport_menu_top, color);
-               UtilGtk.ViewportColor(viewport_menu, color);
                //UtilGtk.ViewportColor(viewport_menu, UtilGtk.BLUE_CLEAR2);
                //UtilGtk.ViewportColor(viewport_menu, UtilGtk.YELLOW);
                //UtilGtk.ViewportColor(viewport_menu, UtilGtk.GRAY_LIGHT);
diff --git a/src/gui/app1/menu_tiny.cs b/src/gui/app1/menu_tiny.cs
index c307a5d2..14ec6af5 100644
--- a/src/gui/app1/menu_tiny.cs
+++ b/src/gui/app1/menu_tiny.cs
@@ -76,7 +76,7 @@ public partial class ChronoJumpWindow
                image_logo_encoder_transp.Visible = false;
                image_logo_encoder.Visible = false;
 
-               if(UtilGtk.ColorIsOkWithLogoTransparent 
(UtilGtk.ColorParse(preferences.colorBackgroundString)))
+               if(! Config.UseSystemColor && UtilGtk.ColorIsOkWithLogoTransparent 
(UtilGtk.ColorParse(preferences.colorBackgroundString)))
                {
                        image_logo_icon_transp.Visible = true;
                        frame_image_logo_icon.Visible = false;
@@ -88,13 +88,17 @@ public partial class ChronoJumpWindow
 
        private void menuTinySetColors ()
        {
-               Gdk.Color color = UtilGtk.ColorParse(preferences.colorBackgroundString);
+               if(! Config.UseSystemColor)
+               {
+                       Gdk.Color color = UtilGtk.ColorParse(preferences.colorBackgroundString);
+
+                       UtilGtk.WindowColor(app1, color);
+                       UtilGtk.ViewportColor(viewport_send_log, color);
+                       UtilGtk.ViewportColor(viewport_exit_confirm, color);
+                       UtilGtk.ViewportColor(viewport_rest_time_contacts, color);
+                       UtilGtk.ViewportColor(viewport_rest_time_encoder, color);
+               }
 
-               UtilGtk.WindowColor(app1, color);
-               UtilGtk.ViewportColor(viewport_send_log, color);
-               UtilGtk.ViewportColor(viewport_exit_confirm, color);
-               UtilGtk.ViewportColor(viewport_rest_time_contacts, color);
-               UtilGtk.ViewportColor(viewport_rest_time_encoder, color);
                UtilGtk.ViewportColor(viewport_image_logo_icon, UtilGtk.BLUE_CHRONOJUMP);
 
                UtilGtk.EventBoxColorBackgroundActive (eventbox_check_menu_session1, UtilGtk.YELLOW, 
UtilGtk.YELLOW_LIGHT);
diff --git a/src/gui/app1/runEncoder.cs b/src/gui/app1/runEncoder.cs
index e0cbd393..93ab143c 100644
--- a/src/gui/app1/runEncoder.cs
+++ b/src/gui/app1/runEncoder.cs
@@ -363,7 +363,7 @@ public partial class ChronoJumpWindow
                contactsShowCaptureDoingButtons(true);
 
                //runEncoderCaptureSimulated = menuitem_check_race_encoder_capture_simulate.Active; //TODO: 
show this in some way on 2.0
-               runEncoderCaptureSimulated = false;
+               runEncoderCaptureSimulated = true;
 
                /*
                //initialize
@@ -841,7 +841,7 @@ public partial class ChronoJumpWindow
        {
                if(preferences.askDeletion) {
                        ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString(
-                                               "Are you sure you want to delete this set?"), "", "", 
preferences.colorBackground);
+                                               "Are you sure you want to delete this set?"), "", "");
                        confirmWin.Button_accept.Clicked += new 
EventHandler(on_run_encoder_load_signal_row_delete);
                } else
                        on_run_encoder_load_signal_row_delete (o, args);
@@ -878,7 +878,7 @@ public partial class ChronoJumpWindow
 
                if(preferences.askDeletion) {
                        ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString(
-                                               "Are you sure you want to delete this set?"), "", "", 
preferences.colorBackground);
+                                               "Are you sure you want to delete this set?"), "", "");
                        confirmWin.Button_accept.Clicked += new 
EventHandler(run_encoder_delete_current_test_accepted);
                } else
                        run_encoder_delete_current_test_accepted(new object(), new EventArgs());
diff --git a/src/gui/app1/session/backup.cs b/src/gui/app1/session/backup.cs
index 9f17ff05..30a68380 100644
--- a/src/gui/app1/session/backup.cs
+++ b/src/gui/app1/session/backup.cs
@@ -129,7 +129,7 @@ public partial class ChronoJumpWindow
                        if(exists) {
                                LogB.Information("Overwrite...");
                                ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString("Are you sure 
you want to overwrite: "),
-                                               "", app1s_fileCopy, preferences.colorBackground);
+                                               "", app1s_fileCopy);
                                confirmWin.Button_accept.Clicked += new 
EventHandler(app1s_backup_on_overwrite_file_accepted);
                        } else {
                                //if multimedia_and_encoder, then copy the folder. If not checked, then copy 
only the db file
diff --git a/src/gui/app1/session/export.cs b/src/gui/app1/session/export.cs
index 29bf3d1b..bc7f8e62 100644
--- a/src/gui/app1/session/export.cs
+++ b/src/gui/app1/session/export.cs
@@ -88,7 +88,7 @@ public partial class ChronoJumpWindow
                        if(exists) {
                                LogB.Information("Overwrite...");
                                ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString("Are you sure 
you want to overwrite: "),
-                                               "", app1s_fileCopy, preferences.colorBackground);
+                                               "", app1s_fileCopy);
                                confirmWin.Button_accept.Clicked += new 
EventHandler(app1s_export_on_overwrite_file_accepted);
                        } else {
                                app1s_pulsebarExportActivity.Visible = true;
diff --git a/src/gui/cairo/jumpsDjOptimalFall.cs b/src/gui/cairo/jumpsDjOptimalFall.cs
index 2e67c617..6e54c1d4 100644
--- a/src/gui/cairo/jumpsDjOptimalFall.cs
+++ b/src/gui/cairo/jumpsDjOptimalFall.cs
@@ -49,8 +49,7 @@ public class JumpsDjOptimalFallGraph : CairoXY
                        double xAtMMaxY, //x at Model MaxY
                        double pointsMaxValue,
                        DrawingArea area,
-                       string title, string jumpType, string date,
-                       Gdk.Color colorBackground)
+                       string title, string jumpType, string date)
        {
                this.point_l = point_l;
                this.coefs = coefs;
@@ -61,7 +60,7 @@ public class JumpsDjOptimalFallGraph : CairoXY
                this.title = title;
                this.jumpType = jumpType;
                this.date = date;
-               this.colorBackground = colorFromGdk(colorBackground);
+               this.colorBackground = colorFromGdk(Config.ColorBackground); //but note if we are using 
system colors, this will not match
 
                xVariable = fallStr;
                yVariable = heightStr;
diff --git a/src/gui/cairo/jumpsEvolution.cs b/src/gui/cairo/jumpsEvolution.cs
index df5ae79c..d98a27af 100644
--- a/src/gui/cairo/jumpsEvolution.cs
+++ b/src/gui/cairo/jumpsEvolution.cs
@@ -44,8 +44,7 @@ public class JumpsEvolutionGraph : CairoXY
        //regular constructor
        public JumpsEvolutionGraph (
                        List<PointF> point_l, double slope, double intercept,
-                       DrawingArea area, string title, string jumpType, string date,
-                       Gdk.Color colorBackground)
+                       DrawingArea area, string title, string jumpType, string date)
        {
                this.point_l = point_l;
                this.slope = slope;
@@ -54,7 +53,7 @@ public class JumpsEvolutionGraph : CairoXY
                this.title = title;
                this.jumpType = jumpType;
                this.date = date;
-               this.colorBackground = colorFromGdk(colorBackground);
+               this.colorBackground = colorFromGdk(Config.ColorBackground); //but note if we are using 
system colors, this will not match
 
                xVariable = dateStr;
                yVariable = heightStr;
diff --git a/src/gui/cairo/jumpsRjFatigue.cs b/src/gui/cairo/jumpsRjFatigue.cs
index dd025305..316d2424 100644
--- a/src/gui/cairo/jumpsRjFatigue.cs
+++ b/src/gui/cairo/jumpsRjFatigue.cs
@@ -45,7 +45,7 @@ public class JumpsRjFatigueGraph : CairoXY
        public JumpsRjFatigueGraph (
                        List<PointF> point_l, double slope, double intercept,
                        DrawingArea area, string title, string jumpType, string date,
-                       bool heights, int divideIn, Gdk.Color colorBackground)
+                       bool heights, int divideIn)
        {
                this.point_l = point_l;
                this.slope = slope;
@@ -55,7 +55,7 @@ public class JumpsRjFatigueGraph : CairoXY
                this.jumpType = jumpType;
                this.date = date;
                this.divideIn = divideIn;
-               this.colorBackground = colorFromGdk(colorBackground);
+               this.colorBackground = colorFromGdk(Config.ColorBackground); //but note if we are using 
system colors, this will not match
 
                xVariable = countStr;
                xUnits = "";
diff --git a/src/gui/cairo/jumpsWeightFVProfile.cs b/src/gui/cairo/jumpsWeightFVProfile.cs
index b282bf86..903badd0 100644
--- a/src/gui/cairo/jumpsWeightFVProfile.cs
+++ b/src/gui/cairo/jumpsWeightFVProfile.cs
@@ -55,8 +55,7 @@ public class JumpsWeightFVProfileGraph : CairoXY
                        JumpsWeightFVProfile jwp,
                        DrawingArea area, string title, //string jumpType,
                        string date, bool showFullGraph,
-                       ErrorAtStart errorMessage, //errorMessage, can make the graph but show the error
-                       Gdk.Color colorBackground)
+                       ErrorAtStart errorMessage) //errorMessage, can make the graph but show the error
        {
                this.point_l = jwp.Point_l_relative;
 
@@ -74,7 +73,7 @@ public class JumpsWeightFVProfileGraph : CairoXY
                this.date = date;
                this.showFullGraph = showFullGraph;
                this.errorMessage = errorMessage;
-               this.colorBackground = colorFromGdk(colorBackground);
+               this.colorBackground = colorFromGdk(Config.ColorBackground); //but note if we are using 
system colors, this will not match
 
                outerMargins = 50; //blank space outside the axis
                if(showFullGraph)
diff --git a/src/gui/chronopicRegister.cs b/src/gui/chronopicRegister.cs
index d25537f2..e9b2f685 100644
--- a/src/gui/chronopicRegister.cs
+++ b/src/gui/chronopicRegister.cs
@@ -109,7 +109,10 @@ public class ChronopicRegisterWindow
        {
                createWindow(app1);
                UtilGtk.IconWindow(chronopic_register_win); //put an icon to window
-               UtilGtk.WindowColor(chronopic_register_win, Config.ColorBackground);
+
+               //manage window color
+               if(! Config.UseSystemColor)
+                       UtilGtk.WindowColor(chronopic_register_win, Config.ColorBackground);
 
                listConnected = new List<ChronopicRegisterPort>();
 
diff --git a/src/gui/confirm.cs b/src/gui/confirm.cs
index d22f82af..deb1996b 100644
--- a/src/gui/confirm.cs
+++ b/src/gui/confirm.cs
@@ -37,7 +37,7 @@ public class ConfirmWindowJumpRun
 
        static ConfirmWindowJumpRun ConfirmWindowJumpRunBox;
        
-       public ConfirmWindowJumpRun (string text1, string question, Gdk.Color colorBackground)
+       public ConfirmWindowJumpRun (string text1, string question)
        {
                //Setup (text, table, uniqueID);
                Glade.XML gladeXML;
@@ -47,9 +47,13 @@ public class ConfirmWindowJumpRun
                confirm_window.Title = "Chronojump - " + Catalog.GetString("Confirm");
                //put an icon to window
                UtilGtk.IconWindow(confirm_window);
-               UtilGtk.WindowColor(confirm_window, colorBackground);
-               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label1);
-               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_question);
+
+               if(! Config.UseSystemColor)
+               {
+                       UtilGtk.WindowColor(confirm_window, Config.ColorBackground);
+                       UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(Config.ColorBackground), label1);
+                       UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(Config.ColorBackground), 
label_question);
+               }
                
                label1.Text = text1;
                if(question == "")
@@ -58,10 +62,10 @@ public class ConfirmWindowJumpRun
                        label_question.Text = question;
        }
 
-       static public ConfirmWindowJumpRun Show (string text1, string question, Gdk.Color colorBackground)
+       static public ConfirmWindowJumpRun Show (string text1, string question)
        {
                if (ConfirmWindowJumpRunBox == null) {
-                       ConfirmWindowJumpRunBox = new ConfirmWindowJumpRun(text1, question, colorBackground);
+                       ConfirmWindowJumpRunBox = new ConfirmWindowJumpRun(text1, question);
                }
                ConfirmWindowJumpRunBox.confirm_window.Show ();
                
@@ -108,7 +112,7 @@ public class ConfirmWindow
 
        static ConfirmWindow ConfirmWindowBox;
        
-       public ConfirmWindow (string text1, string link, string question, Gdk.Color colorBackground)
+       public ConfirmWindow (string text1, string link, string question)
        {
                Glade.XML gladeXML;
                gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "confirm_window.glade", 
"confirm_window", null);
@@ -118,10 +122,14 @@ public class ConfirmWindow
 
                //put an icon to window
                UtilGtk.IconWindow(confirm_window);
-               UtilGtk.WindowColor(confirm_window, colorBackground);
-               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label1);
-               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_link);
-               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_question);
+
+               if(! Config.UseSystemColor)
+               {
+                       UtilGtk.WindowColor(confirm_window, Config.ColorBackground);
+                       UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(Config.ColorBackground), label1);
+                       UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(Config.ColorBackground), label_link);
+                       UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(Config.ColorBackground), 
label_question);
+               }
                
                label1.Text = text1;
                label1.UseMarkup = true;
@@ -140,10 +148,10 @@ public class ConfirmWindow
 
        }
 
-       static public ConfirmWindow Show (string text1, string link, string question, Gdk.Color 
colorBackground)
+       static public ConfirmWindow Show (string text1, string link, string question)
        {
                if (ConfirmWindowBox == null) {
-                       ConfirmWindowBox = new ConfirmWindow(text1, link, question, colorBackground);
+                       ConfirmWindowBox = new ConfirmWindow(text1, link, question);
                }
                ConfirmWindowBox.confirm_window.Show ();
                
diff --git a/src/gui/dialogMessage.cs b/src/gui/dialogMessage.cs
index 511f8e71..b823f828 100644
--- a/src/gui/dialogMessage.cs
+++ b/src/gui/dialogMessage.cs
@@ -82,7 +82,10 @@ public class DialogMessage
 
                //put an icon to window
                UtilGtk.IconWindow(dialog_message);
-               UtilGtk.DialogColor(dialog_message, Config.ColorBackground);
+
+               //manage window color
+               if(! Config.UseSystemColor)
+                       UtilGtk.DialogColor(dialog_message, Config.ColorBackground);
        
                //with this, user doesn't see a moving/changing creation window
                //if uncommented, then does weird bug in windows not showing dialog as its correct size until 
window is moves
diff --git a/src/gui/dialogPersonPopup.cs b/src/gui/dialogPersonPopup.cs
index 149139fe..8c1755ac 100644
--- a/src/gui/dialogPersonPopup.cs
+++ b/src/gui/dialogPersonPopup.cs
@@ -60,7 +60,7 @@ public class DialogPersonPopup
        public DialogPersonPopup (int personID, string name, string rfid,
                        List<Task> tasks, List<StationCount> stationsCount,
                        string networkDevices, bool serverConnected, bool Autologout,
-                       bool compujumpDjango, bool compujumpHideTaskDone, Gdk.Color colorBackground)
+                       bool compujumpDjango, bool compujumpHideTaskDone)
        {
                Glade.XML gladeXML;
                gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "dialog_person_popup.glade", 
"dialog_person_popup", null);
@@ -68,7 +68,10 @@ public class DialogPersonPopup
 
                //put an icon to window
                UtilGtk.IconWindow(dialog_person_popup);
-               UtilGtk.DialogColor(dialog_person_popup, colorBackground);
+
+               //manage window color
+               if(! Config.UseSystemColor)
+                       UtilGtk.DialogColor(dialog_person_popup, Config.ColorBackground);
 
                Visible = true;
                this.Autologout = Autologout;
diff --git a/src/gui/dialogShortcuts.cs b/src/gui/dialogShortcuts.cs
index 9b2ee49e..09c139ed 100644
--- a/src/gui/dialogShortcuts.cs
+++ b/src/gui/dialogShortcuts.cs
@@ -64,7 +64,7 @@ public class DialogShortcuts
        [Widget] Gtk.Image image_fs_4;
 
 
-       public DialogShortcuts (bool isMac, Gdk.Color colorBackground)
+       public DialogShortcuts (bool isMac)
        {
                Glade.XML gladeXML;
                gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "dialog_shortcuts.glade", 
"dialog_shortcuts", "chronojump");
@@ -72,7 +72,10 @@ public class DialogShortcuts
 
                //put an icon to window
                UtilGtk.IconWindow(dialog_shortcuts);
-               UtilGtk.DialogColor(dialog_shortcuts, colorBackground);
+
+               //manage window color
+               if(! Config.UseSystemColor)
+                       UtilGtk.DialogColor(dialog_shortcuts, Config.ColorBackground);
 
                /*
                 * on 2.0 mac will also use ctrl until we find the way to use command
diff --git a/src/gui/dialogThreshold.cs b/src/gui/dialogThreshold.cs
index 6d978ec7..5121de91 100644
--- a/src/gui/dialogThreshold.cs
+++ b/src/gui/dialogThreshold.cs
@@ -58,13 +58,18 @@ public class DialogThreshold
                
                //put an icon to window
                UtilGtk.IconWindow(dialog_threshold);
-               UtilGtk.DialogColor(dialog_threshold, Config.ColorBackground);
-               UtilGtk.ContrastLabelsLabel (Config.ColorBackgroundIsDark, label_threshold_name);
-               UtilGtk.ContrastLabelsLabel (Config.ColorBackgroundIsDark, label_threshold_value);
-               UtilGtk.ContrastLabelsLabel (Config.ColorBackgroundIsDark, label_about);
-               UtilGtk.ContrastLabelsLabel (Config.ColorBackgroundIsDark, label_radio_jumps);
-               UtilGtk.ContrastLabelsLabel (Config.ColorBackgroundIsDark, label_radio_races);
-               UtilGtk.ContrastLabelsLabel (Config.ColorBackgroundIsDark, label_radio_other);
+
+               //manage window color
+               if(! Config.UseSystemColor)
+               {
+                       UtilGtk.DialogColor(dialog_threshold, Config.ColorBackground);
+                       UtilGtk.ContrastLabelsLabel (Config.ColorBackgroundIsDark, label_threshold_name);
+                       UtilGtk.ContrastLabelsLabel (Config.ColorBackgroundIsDark, label_threshold_value);
+                       UtilGtk.ContrastLabelsLabel (Config.ColorBackgroundIsDark, label_about);
+                       UtilGtk.ContrastLabelsLabel (Config.ColorBackgroundIsDark, label_radio_jumps);
+                       UtilGtk.ContrastLabelsLabel (Config.ColorBackgroundIsDark, label_radio_races);
+                       UtilGtk.ContrastLabelsLabel (Config.ColorBackgroundIsDark, label_radio_other);
+               }
 
                FakeButtonClose = new Gtk.Button();
 
diff --git a/src/gui/encoderConfiguration.cs b/src/gui/encoderConfiguration.cs
index 55388588..d4064d81 100644
--- a/src/gui/encoderConfiguration.cs
+++ b/src/gui/encoderConfiguration.cs
@@ -129,7 +129,6 @@ public class EncoderConfigurationWindow
        Pixbuf pixbuf;
 
        Constants.EncoderGI encoderGI;
-       Gdk.Color colorBackground;
 
        /*
         * this params are used on inertial
@@ -167,7 +166,7 @@ public class EncoderConfigurationWindow
 
        static public EncoderConfigurationWindow View (
                        Constants.EncoderGI encoderGI, EncoderConfigurationSQLObject econfSO,
-                       string anchorage_str, int extraWeightN, Gdk.Color colorBackground)
+                       string anchorage_str, int extraWeightN)
        {
                if (EncoderConfigurationWindowBox == null) {
                        EncoderConfigurationWindowBox = new EncoderConfigurationWindow ();
@@ -177,7 +176,6 @@ public class EncoderConfigurationWindow
                EncoderConfigurationWindowBox.updateGUIFromEncoderConfiguration(econfSO.encoderConfiguration);
                EncoderConfigurationWindowBox.main_gui_anchorage_str = anchorage_str;
                EncoderConfigurationWindowBox.main_gui_extraWeightN = extraWeightN;
-               EncoderConfigurationWindowBox.colorBackground = colorBackground;
 
                EncoderConfigurationWindowBox.createTreeView();
                EncoderConfigurationWindowBox.fillTreeView(
@@ -189,14 +187,18 @@ public class EncoderConfigurationWindow
 
                //B) done colors here because this win is created only once
                //if done in constructor will not be updated on another color change
-               UtilGtk.WindowColor(EncoderConfigurationWindowBox.encoder_configuration, colorBackground);
-               bool bgIsDark = UtilGtk.ColorIsDark(colorBackground);
-               UtilGtk.ContrastLabelsLabel(bgIsDark, EncoderConfigurationWindowBox.label_radio_linear);
-               UtilGtk.ContrastLabelsLabel(bgIsDark, 
EncoderConfigurationWindowBox.label_radio_rotary_friction);
-               UtilGtk.ContrastLabelsLabel(bgIsDark, EncoderConfigurationWindowBox.label_radio_rotary_axis);
-               UtilGtk.ContrastLabelsLabel(bgIsDark, 
EncoderConfigurationWindowBox.label_check_rotary_friction_inertia_on_axis);
-               UtilGtk.ContrastLabelsLabel(bgIsDark, EncoderConfigurationWindowBox.label_selected);
-               UtilGtk.ContrastLabelsLabel(bgIsDark, EncoderConfigurationWindowBox.label_count);
+
+               //manage window color
+               if(! Config.UseSystemColor)
+               {
+                       UtilGtk.WindowColor(EncoderConfigurationWindowBox.encoder_configuration, 
Config.ColorBackground);
+                       UtilGtk.ContrastLabelsLabel(Config.ColorBackgroundIsDark, 
EncoderConfigurationWindowBox.label_radio_linear);
+                       UtilGtk.ContrastLabelsLabel(Config.ColorBackgroundIsDark, 
EncoderConfigurationWindowBox.label_radio_rotary_friction);
+                       UtilGtk.ContrastLabelsLabel(Config.ColorBackgroundIsDark, 
EncoderConfigurationWindowBox.label_radio_rotary_axis);
+                       UtilGtk.ContrastLabelsLabel(Config.ColorBackgroundIsDark, 
EncoderConfigurationWindowBox.label_check_rotary_friction_inertia_on_axis);
+                       UtilGtk.ContrastLabelsLabel(Config.ColorBackgroundIsDark, 
EncoderConfigurationWindowBox.label_selected);
+                       UtilGtk.ContrastLabelsLabel(Config.ColorBackgroundIsDark, 
EncoderConfigurationWindowBox.label_count);
+               }
 
                EncoderConfigurationWindowBox.encoder_configuration.Show ();
 
@@ -752,7 +754,7 @@ public class EncoderConfigurationWindow
                                        LogB.Information("Overwrite...");
                                        ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString(
                                                                "Are you sure you want to overwrite file: "), 
"",
-                                                       exportFileName, colorBackground);
+                                                       exportFileName);
 
                                        confirmWin.Button_accept.Clicked +=
                                                new EventHandler(on_overwrite_file_export_accepted);
diff --git a/src/gui/encoderSelectRepetitions.cs b/src/gui/encoderSelectRepetitions.cs
index d1efc527..188addeb 100644
--- a/src/gui/encoderSelectRepetitions.cs
+++ b/src/gui/encoderSelectRepetitions.cs
@@ -178,13 +178,10 @@ public class EncoderSelectRepetitions
 public class EncoderSelectRepetitionsIndividualCurrentSession : EncoderSelectRepetitions
 {
        ArrayList dataPrint;
-       Gdk.Color colorBackground;
 
-       public EncoderSelectRepetitionsIndividualCurrentSession(Gdk.Color colorBackground)
+       public EncoderSelectRepetitionsIndividualCurrentSession()
        {
                Type = Types.INDIVIDUAL_CURRENT_SESSION;
-               this.colorBackground = colorBackground;
-
                FakeButtonDeleteCurve = new Gtk.Button();
        }
 
@@ -388,7 +385,7 @@ public class EncoderSelectRepetitionsIndividualCurrentSession : EncoderSelectRep
        {
                if(askDeletion) {
                        confirmWin = ConfirmWindow.Show(Catalog.GetString(
-                                               "Are you sure you want to delete this repetition?"), "", "", 
colorBackground);
+                                               "Are you sure you want to delete this repetition?"), "", "");
                        confirmWin.Button_accept.Clicked -= new EventHandler(on_show_repetitions_row_delete);
                        confirmWin.Button_accept.Clicked += new EventHandler(on_show_repetitions_row_delete);
                } else
diff --git a/src/gui/event.cs b/src/gui/event.cs
index 8b2edfd4..9e622d26 100644
--- a/src/gui/event.cs
+++ b/src/gui/event.cs
@@ -608,20 +608,16 @@ public class EventMoreWindow
        protected bool testOrDelete; //are we going to do a test or to delete a test type (test is true)
        protected string [] typesTranslated;
 
-       private Gdk.Color colorBackground;
-
        public EventMoreWindow () {
        }
 
-       public EventMoreWindow (Gtk.Window parent, bool testOrDelete, Gdk.Color colorBackground) {
+       public EventMoreWindow (Gtk.Window parent, bool testOrDelete) {
                /*
                Glade.XML gladeXML;
                gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "jumps_runs_more.glade", 
"jumps_runs_more", "chronojump");
                gladeXML.Autoconnect(this);
                */
 
-               this.colorBackground = colorBackground;
-
                //name, startIn, weight, description
                store = new TreeStore(typeof (string), typeof (string), typeof (string), typeof (string));
 
@@ -701,7 +697,7 @@ public class EventMoreWindow
                                        Catalog.GetString("please first edit or delete them."));
                else {
                        ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString("Are you sure you 
want to delete this test type?"), "",
-                                       selectedEventName, colorBackground);
+                                       selectedEventName);
                        confirmWin.Button_accept.Clicked += new EventHandler(on_button_delete_type_accepted);
                }
        }
diff --git a/src/gui/eventExecute.cs b/src/gui/eventExecute.cs
index c295e26e..0f9089d2 100644
--- a/src/gui/eventExecute.cs
+++ b/src/gui/eventExecute.cs
@@ -2914,7 +2914,7 @@ public partial class ChronoJumpWindow
                Gdk.Color brown = new Gdk.Color(0xd6,0x88,0x33);
                Gdk.Color violet = new Gdk.Color(0xc4,0x20,0xf3);
                Gdk.Color white = new Gdk.Color(0xff,0xff,0xff);
-               Gdk.Color colorBackground = UtilGtk.ColorParse(preferences.colorBackgroundString);
+               Gdk.Color colorBackground = UtilGtk.ColorParse(preferences.colorBackgroundString); //but note 
if we are using system colors, this will not match
                Gdk.Color colorBackgroundShifted = UtilGtk.GetColorShifted (colorBackground,
                                ! UtilGtk.ColorIsDark(colorBackground));
 
diff --git a/src/gui/forceSensorElasticBands.cs b/src/gui/forceSensorElasticBands.cs
index 27e3581d..32cbc464 100644
--- a/src/gui/forceSensorElasticBands.cs
+++ b/src/gui/forceSensorElasticBands.cs
@@ -131,7 +131,10 @@ public class ForceSensorElasticBandsWindow
 
                //put an icon to window
                UtilGtk.IconWindow(force_sensor_elastic_bands);
-               UtilGtk.WindowColor(force_sensor_elastic_bands, Config.ColorBackground);
+
+               //manage window color
+               if(! Config.UseSystemColor)
+                       UtilGtk.WindowColor(force_sensor_elastic_bands, Config.ColorBackground);
        
                setTreeview();
        }
diff --git a/src/gui/forceSensorExercise.cs b/src/gui/forceSensorExercise.cs
index bb378632..2418c781 100644
--- a/src/gui/forceSensorExercise.cs
+++ b/src/gui/forceSensorExercise.cs
@@ -128,11 +128,16 @@ public class ForceSensorExerciseWindow
 
                //put an icon to window
                UtilGtk.IconWindow(force_sensor_exercise);
-               UtilGtk.WindowColor(force_sensor_exercise, Config.ColorBackground);
-               UtilGtk.ContrastLabelsLabel (Config.ColorBackgroundIsDark, label_header);
-               UtilGtk.ContrastLabelsLabel (Config.ColorBackgroundIsDark, label_help);
-               UtilGtk.ContrastLabelsLabel (Config.ColorBackgroundIsDark, label_radio_desc_examples_desc);
-               UtilGtk.ContrastLabelsLabel (Config.ColorBackgroundIsDark, 
label_radio_desc_examples_examples);
+
+               //manage window color
+               if(! Config.UseSystemColor)
+               {
+                       UtilGtk.WindowColor(force_sensor_exercise, Config.ColorBackground);
+                       UtilGtk.ContrastLabelsLabel (Config.ColorBackgroundIsDark, label_header);
+                       UtilGtk.ContrastLabelsLabel (Config.ColorBackgroundIsDark, label_help);
+                       UtilGtk.ContrastLabelsLabel (Config.ColorBackgroundIsDark, 
label_radio_desc_examples_desc);
+                       UtilGtk.ContrastLabelsLabel (Config.ColorBackgroundIsDark, 
label_radio_desc_examples_examples);
+               }
 
                force_sensor_exercise.Resizable = false;
                setTitle(title);
diff --git a/src/gui/genericWindow.cs b/src/gui/genericWindow.cs
index b5becefa..b3622e8a 100644
--- a/src/gui/genericWindow.cs
+++ b/src/gui/genericWindow.cs
@@ -131,9 +131,14 @@ public class GenericWindow
        
                //put an icon to window
                UtilGtk.IconWindow(generic_window);
-               UtilGtk.WindowColor(generic_window, Config.ColorBackground);
-               UtilGtk.ContrastLabelsLabel (Config.ColorBackgroundIsDark, label_header);
-               UtilGtk.ContrastLabelsLabel (Config.ColorBackgroundIsDark, label_error);
+
+               //manage window color
+               if(! Config.UseSystemColor)
+               {
+                       UtilGtk.WindowColor(generic_window, Config.ColorBackground);
+                       UtilGtk.ContrastLabelsLabel (Config.ColorBackgroundIsDark, label_header);
+                       UtilGtk.ContrastLabelsLabel (Config.ColorBackgroundIsDark, label_error);
+               }
                
                generic_window.Resizable = false;
                setTitle(title);
diff --git a/src/gui/networks.cs b/src/gui/networks.cs
index 9a11692d..dc11649e 100644
--- a/src/gui/networks.cs
+++ b/src/gui/networks.cs
@@ -909,8 +909,7 @@ public partial class ChronoJumpWindow
                dialogPersonPopup = new DialogPersonPopup(
                                currentPerson.UniqueID, currentPerson.Name, capturedRFID, tasks, 
stationsCount,
                                networkDevices, serverConnected, compujumpAutologout.Active,
-                               configChronojump.CompujumpDjango, configChronojump.CompujumpHideTaskDone,
-                               preferences.colorBackground);
+                               configChronojump.CompujumpDjango, configChronojump.CompujumpHideTaskDone);
 
                dialogPersonPopup.Fake_button_start_task.Clicked -= new EventHandler(compujumpTaskStart);
                dialogPersonPopup.Fake_button_start_task.Clicked += new EventHandler(compujumpTaskStart);
diff --git a/src/gui/overview.cs b/src/gui/overview.cs
index 55cf51f7..80bdd055 100644
--- a/src/gui/overview.cs
+++ b/src/gui/overview.cs
@@ -179,7 +179,10 @@ public class EncoderOverviewWindow : OverviewWindow
 
                //put an icon to window
                UtilGtk.IconWindow(overview_win);
-               UtilGtk.WindowColor(overview_win, Config.ColorBackground);
+
+               //manage window color
+               if(! Config.UseSystemColor)
+                       UtilGtk.WindowColor(overview_win, Config.ColorBackground);
        }
 
        static public EncoderOverviewWindow Show (Gtk.Window parent, Constants.EncoderGI encoderGI, int 
sessionID)
@@ -297,7 +300,10 @@ public class ForceSensorOverviewWindow : OverviewWindow
 
                //put an icon to window
                UtilGtk.IconWindow(overview_win);
-               UtilGtk.WindowColor(overview_win, Config.ColorBackground);
+
+               //manage window color
+               if(! Config.UseSystemColor)
+                       UtilGtk.WindowColor(overview_win, Config.ColorBackground);
        }
 
        static public ForceSensorOverviewWindow Show (Gtk.Window parent, int sessionID)
@@ -354,7 +360,10 @@ public class RunEncoderOverviewWindow : OverviewWindow
 
                //put an icon to window
                UtilGtk.IconWindow(overview_win);
-               UtilGtk.WindowColor(overview_win, Config.ColorBackground);
+
+               //manage window color
+               if(! Config.UseSystemColor)
+                       UtilGtk.WindowColor(overview_win, Config.ColorBackground);
        }
 
        static public RunEncoderOverviewWindow Show (Gtk.Window parent, int sessionID)
diff --git a/src/gui/person/addModify.cs b/src/gui/person/addModify.cs
index 5ba296c0..0ca75955 100644
--- a/src/gui/person/addModify.cs
+++ b/src/gui/person/addModify.cs
@@ -149,7 +149,7 @@ public class PersonAddModifyWindow
        //if we are modifying a person, currentPerson.UniqueID is obviously it's ID
        //showCapturePhoto is false on raspberry to not use camera
        //PersonAddModifyWindow (Gtk.Window parent, Session currentSession, Person currentPerson, bool 
showCapturePhoto)
-       PersonAddModifyWindow (Gtk.Window parent, Session currentSession, Person currentPerson, Gdk.Color 
colorBackground)
+       PersonAddModifyWindow (Gtk.Window parent, Session currentSession, Person currentPerson)
        {
                Glade.XML gladeXML;
                gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "person_win.glade", "person_win", 
null);
@@ -157,8 +157,13 @@ public class PersonAddModifyWindow
                
                //put an icon to window
                UtilGtk.IconWindow(person_win);
-               UtilGtk.WindowColor(person_win, colorBackground);
-               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_error);
+
+               //manage window color
+               if(! Config.UseSystemColor)
+               {
+                       UtilGtk.WindowColor(person_win, Config.ColorBackground);
+                       UtilGtk.ContrastLabelsLabel(Config.ColorBackgroundIsDark, label_error);
+               }
 
                person_win.Parent = parent;
                this.currentSession = currentSession;
@@ -538,11 +543,11 @@ public class PersonAddModifyWindow
                        //Gtk.CheckButton app1_checkbutton_video, bool showCapturePhoto,
                        Gtk.CheckButton app1_checkbutton_video_contacts,
                        string videoDevice, string videoDevicePixelFormat, string videoDeviceResolution, 
string videoDeviceFramerate,
-                       bool compujump, bool metric, Gdk.Color colorBackground)
+                       bool compujump, bool metric)
        {
                if (PersonAddModifyWindowBox == null) {
                        //PersonAddModifyWindowBox = new PersonAddModifyWindow (parent, mySession, 
currentPerson, showCapturePhoto);
-                       PersonAddModifyWindowBox = new PersonAddModifyWindow (parent, mySession, 
currentPerson, colorBackground);
+                       PersonAddModifyWindowBox = new PersonAddModifyWindow (parent, mySession, 
currentPerson);
                }
 
                PersonAddModifyWindowBox.pDN = pDN;
diff --git a/src/gui/person/addMultiple.cs b/src/gui/person/addMultiple.cs
index f37fd613..44ab7e56 100644
--- a/src/gui/person/addMultiple.cs
+++ b/src/gui/person/addMultiple.cs
@@ -100,7 +100,7 @@ public class PersonAddMultipleWindow
        string errorRepeatedEntryString;
 
        
-       PersonAddMultipleWindow (Gtk.Window parent, Session currentSession, char columnDelimiter, Gdk.Color 
colorBackground)
+       PersonAddMultipleWindow (Gtk.Window parent, Session currentSession, char columnDelimiter)
        {
                Glade.XML gladeXML;
                gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "person_multiple_infinite.glade", 
"person_multiple_infinite", null);
@@ -108,17 +108,20 @@ public class PersonAddMultipleWindow
                
                //put an icon to window
                UtilGtk.IconWindow(person_multiple_infinite);
-               UtilGtk.WindowColor(person_multiple_infinite, colorBackground);
+
+               //manage window color
+               if(! Config.UseSystemColor)
+                       UtilGtk.WindowColor(person_multiple_infinite, Config.ColorBackground);
        
                person_multiple_infinite.Parent = parent;
                this.currentSession = currentSession;
                this.columnDelimiter = columnDelimiter;
        }
        
-       static public PersonAddMultipleWindow Show (Gtk.Window parent, Session currentSession, char 
columnDelimiter, Gdk.Color colorBackground)
+       static public PersonAddMultipleWindow Show (Gtk.Window parent, Session currentSession, char 
columnDelimiter)
        {
                if (PersonAddMultipleWindowBox == null) {
-                       PersonAddMultipleWindowBox = new PersonAddMultipleWindow (parent, currentSession, 
columnDelimiter, colorBackground);
+                       PersonAddMultipleWindowBox = new PersonAddMultipleWindow (parent, currentSession, 
columnDelimiter);
                }
                
                PersonAddMultipleWindowBox.putNonStandardIcons ();
diff --git a/src/gui/person/personSelect.cs b/src/gui/person/personSelect.cs
index e43d7e87..2fdf0936 100644
--- a/src/gui/person/personSelect.cs
+++ b/src/gui/person/personSelect.cs
@@ -69,7 +69,7 @@ public class PersonSelectWindow
        private List<PersonPhotoButton> list_ppb;
 
        
-       PersonSelectWindow (Gtk.Window parent, Gdk.Color colorBackground) {
+       PersonSelectWindow (Gtk.Window parent) {
                Glade.XML gladeXML;
                gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "person_select_window.glade", 
"person_select_window", "chronojump");
                gladeXML.Autoconnect(this);
@@ -78,8 +78,13 @@ public class PersonSelectWindow
 
                //put an icon to window
                UtilGtk.IconWindow(person_select_window);
-               UtilGtk.WindowColor(person_select_window, colorBackground);
-               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_confirm);
+
+               //manage window color
+               if(! Config.UseSystemColor)
+               {
+                       UtilGtk.WindowColor(person_select_window, Config.ColorBackground);
+                       UtilGtk.ContrastLabelsLabel(Config.ColorBackgroundIsDark, label_confirm);
+               }
 
                person_select_window.Parent = parent;
                
@@ -118,7 +123,7 @@ public class PersonSelectWindow
        static public PersonSelectWindow Show (Gtk.Window parent, ArrayList persons, Person currentPerson, 
Gdk.Color colorBackground)
        {
                if (PersonSelectWindowBox == null) {
-                       PersonSelectWindowBox = new PersonSelectWindow (parent, colorBackground);
+                       PersonSelectWindowBox = new PersonSelectWindow (parent);
                }
 
                PersonSelectWindowBox.persons = persons;
diff --git a/src/gui/person/recuperate.cs b/src/gui/person/recuperate.cs
index 766e7893..e04293d5 100644
--- a/src/gui/person/recuperate.cs
+++ b/src/gui/person/recuperate.cs
@@ -66,7 +66,7 @@ public class PersonRecuperateWindow {
        protected PersonRecuperateWindow () {
        }
 
-       PersonRecuperateWindow (Gtk.Window parent, Session currentSession, Gdk.Color colorBackground) {
+       PersonRecuperateWindow (Gtk.Window parent, Session currentSession) {
                Glade.XML gladeXML;
                gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "person_recuperate.glade", 
"person_recuperate", null);
                gladeXML.Autoconnect(this);
@@ -74,11 +74,16 @@ public class PersonRecuperateWindow {
                
                //put an icon to window
                UtilGtk.IconWindow(person_recuperate);
-               UtilGtk.WindowColor(person_recuperate, colorBackground);
-               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_top);
-               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_from_session);
-               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_check);
-               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_filter);
+
+               //manage window color
+               if(! Config.UseSystemColor)
+               {
+                       UtilGtk.WindowColor(person_recuperate, Config.ColorBackground);
+                       UtilGtk.ContrastLabelsLabel(Config.ColorBackgroundIsDark, label_top);
+                       UtilGtk.ContrastLabelsLabel(Config.ColorBackgroundIsDark, label_from_session);
+                       UtilGtk.ContrastLabelsLabel(Config.ColorBackgroundIsDark, label_check);
+                       UtilGtk.ContrastLabelsLabel(Config.ColorBackgroundIsDark, label_filter);
+               }
 
                this.currentSession = currentSession;
                
@@ -101,10 +106,10 @@ public class PersonRecuperateWindow {
                treeview_person_recuperate.Selection.Changed += onSelectionEntry;
        }
        
-       static public PersonRecuperateWindow Show (Gtk.Window parent, Session currentSession, int pDN, 
Gdk.Color colorBackground)
+       static public PersonRecuperateWindow Show (Gtk.Window parent, Session currentSession, int pDN)
        {
                if (PersonRecuperateWindowBox == null) {
-                       PersonRecuperateWindowBox = new PersonRecuperateWindow (parent, currentSession, 
colorBackground);
+                       PersonRecuperateWindowBox = new PersonRecuperateWindow (parent, currentSession);
                }
                PersonRecuperateWindowBox.pDN = pDN;
 
@@ -314,7 +319,7 @@ public class PersonsRecuperateFromOtherSessionWindow : PersonRecuperateWindow
        protected PersonsRecuperateFromOtherSessionWindow () {
        }
 
-       PersonsRecuperateFromOtherSessionWindow (Gtk.Window parent, Session currentSession, Gdk.Color 
colorBackground) {
+       PersonsRecuperateFromOtherSessionWindow (Gtk.Window parent, Session currentSession) {
                Glade.XML gladeXML;
                gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "person_recuperate.glade", 
"person_recuperate", null);
                gladeXML.Autoconnect(this);
@@ -322,11 +327,17 @@ public class PersonsRecuperateFromOtherSessionWindow : PersonRecuperateWindow
                
                //put an icon to window
                UtilGtk.IconWindow(person_recuperate);
-               UtilGtk.WindowColor(person_recuperate, colorBackground);
-               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_top);
-               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_from_session);
-               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_check);
-               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_filter);
+
+               //manage window color
+               if(! Config.UseSystemColor)
+               {
+                       UtilGtk.WindowColor(person_recuperate, Config.ColorBackground);
+                       UtilGtk.ContrastLabelsLabel(Config.ColorBackgroundIsDark, label_top);
+                       UtilGtk.ContrastLabelsLabel(Config.ColorBackgroundIsDark, label_from_session);
+                       UtilGtk.ContrastLabelsLabel(Config.ColorBackgroundIsDark, label_check);
+                       UtilGtk.ContrastLabelsLabel(Config.ColorBackgroundIsDark, label_filter);
+               }
+
                person_recuperate.Title = Catalog.GetString("Load persons from other session");
 
        
@@ -365,11 +376,11 @@ public class PersonsRecuperateFromOtherSessionWindow : PersonRecuperateWindow
        }
 
        static public PersonsRecuperateFromOtherSessionWindow Show (
-                       Gtk.Window parent, Session currentSession, Gdk.Color colorBackground)
+                       Gtk.Window parent, Session currentSession)
        {
                if (PersonsRecuperateFromOtherSessionWindowBox == null) {
                        PersonsRecuperateFromOtherSessionWindowBox = 
-                               new PersonsRecuperateFromOtherSessionWindow (parent, currentSession, 
colorBackground);
+                               new PersonsRecuperateFromOtherSessionWindow (parent, currentSession);
                }
                PersonsRecuperateFromOtherSessionWindowBox.person_recuperate.Show ();
                
diff --git a/src/gui/person/showAllEvents.cs b/src/gui/person/showAllEvents.cs
index e2628c0b..43e7b855 100644
--- a/src/gui/person/showAllEvents.cs
+++ b/src/gui/person/showAllEvents.cs
@@ -48,7 +48,7 @@ public class PersonShowAllEventsWindow
        
        protected Person currentPerson;
        
-       PersonShowAllEventsWindow (Gtk.Window parent, int sessionID, Person currentPerson, Gdk.Color 
colorBackground)
+       PersonShowAllEventsWindow (Gtk.Window parent, int sessionID, Person currentPerson)
        {
                Glade.XML gladeXML;
                gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "person_show_all_events.glade", 
"person_show_all_events", "chronojump");
@@ -56,10 +56,15 @@ public class PersonShowAllEventsWindow
                
                //put an icon to window
                UtilGtk.IconWindow(person_show_all_events);
-               UtilGtk.WindowColor(person_show_all_events, colorBackground);
-               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), 
label_checkbutton_only_current_session);
-               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_person);
-               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_person_name);
+
+               //manage window color
+               if(! Config.UseSystemColor)
+               {
+                       UtilGtk.WindowColor(person_show_all_events, Config.ColorBackground);
+                       UtilGtk.ContrastLabelsLabel(Config.ColorBackgroundIsDark, 
label_checkbutton_only_current_session);
+                       UtilGtk.ContrastLabelsLabel(Config.ColorBackgroundIsDark, label_person);
+                       UtilGtk.ContrastLabelsLabel(Config.ColorBackgroundIsDark, label_person_name);
+               }
 
                person_show_all_events.Parent = parent;
                this.sessionID = sessionID;
@@ -81,7 +86,7 @@ public class PersonShowAllEventsWindow
                        int sessionID, Person currentPerson, bool allowChangePerson, Gdk.Color 
colorBackground)
        {
                if (PersonShowAllEventsWindowBox == null) {
-                       PersonShowAllEventsWindowBox = new PersonShowAllEventsWindow (parent, sessionID, 
currentPerson, colorBackground);
+                       PersonShowAllEventsWindowBox = new PersonShowAllEventsWindow (parent, sessionID, 
currentPerson);
                }
 
                if(allowChangePerson)
diff --git a/src/gui/preferences.cs b/src/gui/preferences.cs
index df0cc02d..7357b5b2 100644
--- a/src/gui/preferences.cs
+++ b/src/gui/preferences.cs
@@ -71,7 +71,15 @@ public class PreferencesWindow
        [Widget] Gtk.CheckButton check_appearance_person_photo;
        [Widget] Gtk.Alignment alignment_undecorated;
        [Widget] Gtk.Label label_recommended_undecorated;
+
+       [Widget] Gtk.RadioButton radio_color_custom;
+       [Widget] Gtk.RadioButton radio_color_chronojump_blue;
+       [Widget] Gtk.RadioButton radio_color_os;
        [Widget] Gtk.DrawingArea drawingarea_background_color;
+       [Widget] Gtk.Button button_color_choose;
+       [Widget] Gtk.DrawingArea drawingarea_background_color_chronojump_blue;
+       [Widget] Gtk.Label label_radio_color_os_needs_restart;
+
        [Widget] Gtk.CheckButton check_logo_animated;
        [Widget] Gtk.HBox hbox_last_session_and_mode;
        [Widget] Gtk.CheckButton check_session_autoload_at_start;
@@ -704,8 +712,22 @@ public class PreferencesWindow
                else //if(preferences.importerPythonVersion == Preferences.pythonVersionEnum.Python)
                        PreferencesWindowBox.radio_python_default.Active = true;
 
+               if(preferences.colorBackgroundString == "") {
+                       PreferencesWindowBox.radio_color_os.Active = true;
+                       PreferencesWindowBox.button_color_choose.Sensitive = false;
+               }
+               else if((preferences.colorBackgroundString).ToLower() == "#0e1e46") {
+                       PreferencesWindowBox.radio_color_chronojump_blue.Active = true;
+                       PreferencesWindowBox.button_color_choose.Sensitive = false;
+               }
+               else {
+                       PreferencesWindowBox.radio_color_custom.Active = true;
+                       PreferencesWindowBox.button_color_choose.Sensitive = true;
+               }
+
                PreferencesWindowBox.colorBackground = UtilGtk.ColorParse(preferences.colorBackgroundString);
                PreferencesWindowBox.paintColorDrawingAreaAndBg (PreferencesWindowBox.colorBackground);
+               
UtilGtk.PaintColorDrawingArea(PreferencesWindowBox.drawingarea_background_color_chronojump_blue, 
UtilGtk.BLUE_CHRONOJUMP);
 
                PreferencesWindowBox.preferences_win.Show ();
                return PreferencesWindowBox;
@@ -768,6 +790,22 @@ public class PreferencesWindow
                UtilGtk.ContrastLabelsLabel (preferences.colorBackgroundIsDark, label_view_more_tabs);
        }
 
+       private void on_radio_color_custom_toggled (object o, EventArgs args)
+       {
+               button_color_choose.Sensitive = true;
+               label_radio_color_os_needs_restart.Visible = false;
+       }
+       private void on_radio_color_chronojump_blue_toggled (object o, EventArgs args)
+       {
+               button_color_choose.Sensitive = false;
+               label_radio_color_os_needs_restart.Visible = false;
+       }
+       private void on_radio_color_os_toggled (object o, EventArgs args)
+       {
+               button_color_choose.Sensitive = false;
+               label_radio_color_os_needs_restart.Visible = true;
+       }
+
        private void on_button_color_choose_clicked(object o, EventArgs args)
        {
                using (ColorSelectionDialog colorSelectionDialog = new ColorSelectionDialog 
(Catalog.GetString("Select color")))
@@ -1645,10 +1683,24 @@ public class PreferencesWindow
                        preferences.menuType = Preferences.MenuTypes.ICONS;
                }
 
-               preferences.colorBackgroundString = Preferences.PreferencesChange(
-                               SqlitePreferences.ColorBackground, preferences.colorBackgroundString,
-                               UtilGtk.ColorToColorString(colorBackground)); //this does the reverse of 
Gdk.Color.Parse on UtilGtk.ColorParse()
-               preferences.colorBackgroundIsDark = UtilGtk.ColorIsDark(colorBackground);
+               if(radio_color_chronojump_blue.Active) 
+               {
+                       preferences.colorBackgroundString = Preferences.PreferencesChange(
+                                       SqlitePreferences.ColorBackground, preferences.colorBackgroundString,
+                                       "#0e1e46");
+                       preferences.colorBackgroundIsDark = true;
+               } else if(radio_color_os.Active)
+               {
+                       preferences.colorBackgroundString = Preferences.PreferencesChange(
+                                       SqlitePreferences.ColorBackground, preferences.colorBackgroundString,
+                                       "");
+                       preferences.colorBackgroundIsDark = false; //is not important as it is not going to 
be used
+               } else {
+                       preferences.colorBackgroundString = Preferences.PreferencesChange(
+                                       SqlitePreferences.ColorBackground, preferences.colorBackgroundString,
+                                       UtilGtk.ColorToColorString(colorBackground)); //this does the reverse 
of Gdk.Color.Parse on UtilGtk.ColorParse()
+                       preferences.colorBackgroundIsDark = UtilGtk.ColorIsDark(colorBackground);
+               }
 
                preferences.logoAnimatedShow = Preferences.PreferencesChange(
                                SqlitePreferences.LogoAnimatedShow, preferences.logoAnimatedShow,
diff --git a/src/gui/repetitiveConditions.cs b/src/gui/repetitiveConditions.cs
index 9564ad36..39979ead 100644
--- a/src/gui/repetitiveConditions.cs
+++ b/src/gui/repetitiveConditions.cs
@@ -272,7 +272,10 @@ public class RepetitiveConditionsWindow
 
                if(viewWindow)
                {
-                       UtilGtk.WindowColor(RepetitiveConditionsWindowBox.repetitive_conditions, 
Config.ColorBackground);
+                       //manage window color
+                       if(! Config.UseSystemColor)
+                               UtilGtk.WindowColor(RepetitiveConditionsWindowBox.repetitive_conditions, 
Config.ColorBackground);
+
                        RepetitiveConditionsWindowBox.repetitive_conditions.Show ();
                }
 
diff --git a/src/preferences.cs b/src/preferences.cs
index 8818b5b9..dd1edbd6 100644
--- a/src/preferences.cs
+++ b/src/preferences.cs
@@ -36,7 +36,7 @@ public class Preferences
        //public string colorBackgroundString = "#0e1e46";
        public enum MenuTypes { ALL, TEXT, ICONS};
        public MenuTypes menuType;
-       public string colorBackgroundString;
+       public string colorBackgroundString; //"" means system color (do not do nothing)
        public bool colorBackgroundIsDark; //this is assigned when colorBackgroundString changes. And this is 
used by the rest of the program. Not stored on SQL.
        public bool logoAnimatedShow;
 


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