diff --git a/DMX-2.0/DMX-2.0.csproj b/DMX-2.0/DMX-2.0.csproj index cd80254..5d49b8a 100644 --- a/DMX-2.0/DMX-2.0.csproj +++ b/DMX-2.0/DMX-2.0.csproj @@ -83,6 +83,9 @@ true + + style.gtkrc + diff --git a/DMX-2.0/Main.cs b/DMX-2.0/Main.cs index 90cadfa..6b44feb 100644 --- a/DMX-2.0/Main.cs +++ b/DMX-2.0/Main.cs @@ -5,13 +5,21 @@ namespace DMX2 { class MainClass { - - public static void Main (string[] args) { Application.Init (); + if(System.IO.File.Exists("style.gtkrc")) Gtk.Rc.Parse("style.gtkrc"); + else using (System.IO.Stream stream = + System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("style.gtkrc")) + { + using (System.IO.TextReader reader = new System.IO.StreamReader(stream)) + { + Gtk.Rc.ParseString (reader.ReadToEnd()); + } + } + MainWindow win = new MainWindow (); win.Show (); diff --git a/DMX-2.0/MainWindow.cs b/DMX-2.0/MainWindow.cs index e84659f..9afda49 100644 --- a/DMX-2.0/MainWindow.cs +++ b/DMX-2.0/MainWindow.cs @@ -23,6 +23,7 @@ namespace DMX2 win=this; Build (); MajWidgets(); + defStyle= this.Style; } @@ -511,8 +512,9 @@ namespace DMX2 foreach (var circuit in Conduite.Courante.Circuits) { vboxCircuits.PackStart (pb=new ProgressBar (),false,false,0); pb.Text = (++i).ToString() + " - " + circuit.Name; - pb.HeightRequest = 22; + pb.HeightRequest = 12; pb.Data[circuitKey] = circuit; + pb.Name ="pb"; } vboxCircuits.ShowAll (); } @@ -588,6 +590,8 @@ namespace DMX2 ChangeMatriceCouleur(); } + Style defStyle; + void ChangeMatriceCouleur () { if (Conduite.Courante.BlackOut) { @@ -607,7 +611,7 @@ namespace DMX2 return; } - ModifyBg (Gtk.StateType.Normal, new Gdk.Color (255, 255, 255)); + ModifyBg (Gtk.StateType.Normal, defStyle.Background(StateType.Normal) ); } diff --git a/DMX-2.0/SequenceurMacro.cs b/DMX-2.0/SequenceurMacro.cs index 9db53f6..fc282a0 100644 --- a/DMX-2.0/SequenceurMacro.cs +++ b/DMX-2.0/SequenceurMacro.cs @@ -388,8 +388,7 @@ namespace DMX2 Circuit c = Conduite.Courante.GetCircuitByID(i); if(circuitsSeq.Contains(c)) { - if(effetsEnCours.ContainsKey(c)) effetsEnCours.Remove(c); - effetsEnCours.Add(c, new EffetMacro(temps,valeurscourantes[c],valeurCible)); + effetsEnCours[c] = new EffetMacro(temps,valeurscourantes[c],valeurCible); } } } @@ -514,7 +513,7 @@ namespace DMX2 ligneMaitre = enCours; timeStamp = TimeSpan.Zero; - + topPresent = false; int index = IndexLigneEnCours+1; if(index