[Fencommits] fenfire-hs: use gtk theme color as the canvas background

Benja Fallenstein benja.fallenstein at gmail.com
Thu Feb 15 19:19:09 EET 2007


Thu Feb 15 19:18:51 EET 2007  Benja Fallenstein <benja.fallenstein at gmail.com>
  * use gtk theme color as the canvas background
diff -rN -u old-fenfire-hs/Fenfire.fhs new-fenfire-hs/Fenfire.fhs
--- old-fenfire-hs/Fenfire.fhs	2007-02-15 19:19:08.000000000 +0200
+++ new-fenfire-hs/Fenfire.fhs	2007-02-15 19:19:08.000000000 +0200
@@ -631,6 +631,8 @@
     blurColor <- styleGetBase style StateActive
     textColor <- styleGetText style StateSelected
     blurTextColor <- styleGetText style StateActive
+    
+    canvasBgColor <- styleGetBackground style StateNormal
 
     let alpha x (Color r g b a) = Color r g b (x*a)
 
@@ -658,12 +660,12 @@
 
     -- start:
 
-    makeWindow window view stateRef
+    makeWindow window canvasBgColor view stateRef
     widgetShowAll window
 
     mainGUI
 
-makeWindow window view stateRef = do
+makeWindow window canvasBgColor view stateRef = do
 
     -- main window:
 
@@ -707,7 +709,7 @@
     
     (canvas, updateCanvas, canvasAction) <- 
         vobCanvas stateRef view handleEvent handleAction
-                  stateChanged lightGray 0.5
+                  stateChanged (fromGtkColor canvasBgColor) 0.5
 
     onFocusIn canvas $ \_event -> do 
         modifyIORef stateRef $ \s -> s { fsHasFocus = True }




More information about the Fencommits mailing list