[f-spot] Fix style behaviour, resolve ctor dep



commit 87302b1f8d43d78ce899dd6c4b589b7ec31981b3
Author: Paul Wellner Bou <paul purecodes org>
Date:   Thu Nov 12 10:28:19 2009 +0100

    Fix style behaviour, resolve ctor dep

 src/Widgets/InfoBox.cs |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/src/Widgets/InfoBox.cs b/src/Widgets/InfoBox.cs
index 1a54263..3768b5a 100644
--- a/src/Widgets/InfoBox.cs
+++ b/src/Widgets/InfoBox.cs
@@ -184,17 +184,18 @@ namespace FSpot.Widgets
 				ContextSwitchStrategy.SetHistogramVisible (Context, histogram_expander.Expanded);
 				UpdateHistogram ();
 			};
+			histogram_expander.StyleSet += delegate (object sender, StyleSetArgs args) { 
+				Gdk.Color c = this.Toplevel.Style.Backgrounds [(int)Gtk.StateType.Active];
+				histogram.RedColorHint = (byte) (c.Red / 0xff);
+				histogram.GreenColorHint = (byte) (c.Green / 0xff);
+				histogram.BlueColorHint = (byte) (c.Blue / 0xff);
+				histogram.BackgroundColorHint = 0xff;
+				UpdateHistogram ();
+			};
 			histogram_image = new Gtk.Image ();
 			histogram = new Histogram ();
 			histogram_expander.Add (histogram_image);
 
-			Window window = MainWindow.Toplevel.Window;
-			Gdk.Color c = window.Style.Backgrounds [(int)Gtk.StateType.Active];
-			histogram.RedColorHint = (byte) (c.Red / 0xff);
-			histogram.GreenColorHint = (byte) (c.Green / 0xff);
-			histogram.BlueColorHint = (byte) (c.Blue / 0xff);
-			histogram.BackgroundColorHint = 0xff;
-
 			Add (histogram_expander);
 
 			info_expander = new Expander (Catalog.GetString ("Image Information"));



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