[f-spot] Allows overall transparency, if themes supports it



commit f65e53d00be8dcbc39f32d3de23f1306ad924b12
Author: Stephane Delcroix <stephane delcroix org>
Date:   Tue Oct 20 15:08:53 2009 +0200

    Allows overall transparency, if themes supports it
    
    set the static Gtk.Widget.Colormap to Rgba if the screen supports it.
    Allows theme engines like murrine to leverage on this and provide per
    widget transparency settings

 src/MainWindow.cs |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/MainWindow.cs b/src/MainWindow.cs
index e32e3f6..640abe4 100644
--- a/src/MainWindow.cs
+++ b/src/MainWindow.cs
@@ -235,6 +235,15 @@ namespace FSpot
 	
 			GtkBeans.Builder builder = new GtkBeans.Builder ("main_window.ui");
 			builder.Autoconnect (this);
+
+			//Set the global DefaultColormap. Allows transparency according
+			//to the theme (work on murrine engine)
+			Gdk.Colormap colormap = ((Widget)main_window).Screen.RgbaColormap;
+			if (colormap == null) {
+				Log.Debug ("Your screen doesn't support alpha channels!");
+				colormap = ((Widget)main_window).Screen.RgbColormap;
+			}
+			Gtk.Widget.DefaultColormap = colormap;
 	
 			LoadPreference (Preferences.MAIN_WINDOW_WIDTH);
 			LoadPreference (Preferences.MAIN_WINDOW_X);
@@ -501,6 +510,7 @@ namespace FSpot
 			UpdateToolbar ();
 	
 			(uimanager.GetWidget("/ui/menubar1/file1/close1") as MenuItem).Hide ();
+
 	
 			Banshee.Kernel.Scheduler.Resume ();
 		}



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