hippo-canvas r7243 - in trunk: common/hippo linux/hippo



Author: otaylor
Date: Tue Mar 25 15:09:19 2008
New Revision: 7243
URL: http://svn.gnome.org/viewvc/hippo-canvas?rev=7243&view=rev

Log:
hippo-canvas-link.c: Fix bug when changing link type
hippo-canvas-style.c: Fix inheritance of foreground color
hippo-canvas-helper.c: Combine color components with | not &


Modified:
   trunk/common/hippo/hippo-canvas-link.c
   trunk/common/hippo/hippo-canvas-style.c
   trunk/linux/hippo/hippo-canvas-helper.c

Modified: trunk/common/hippo/hippo-canvas-link.c
==============================================================================
--- trunk/common/hippo/hippo-canvas-link.c	(original)
+++ trunk/common/hippo/hippo-canvas-link.c	Tue Mar 25 15:09:19 2008
@@ -106,8 +106,8 @@
 
         link->visited = visited;
         
-        hippo_canvas_style_set_link_type(box->style,
-                                         visited ? HIPPO_CANVAS_LINK_VISITED : HIPPO_CANVAS_LINK_LINK);
+        hippo_canvas_box_set_link_type(box,
+                                       visited ? HIPPO_CANVAS_LINK_VISITED : HIPPO_CANVAS_LINK_LINK);
     }
 }
 

Modified: trunk/common/hippo/hippo-canvas-style.c
==============================================================================
--- trunk/common/hippo/hippo-canvas-style.c	(original)
+++ trunk/common/hippo/hippo-canvas-style.c	Tue Mar 25 15:09:19 2008
@@ -795,17 +795,15 @@
                 if (result == VALUE_FOUND) {
                     return style->foreground_color;
                 } else if (result == VALUE_INHERIT) {
-                    if (style->parent_style) {
-                        style->foreground_color = hippo_canvas_style_get_foreground_color(style->parent_style);
-                        return style->foreground_color;
-                    }
-
                     break;
                 }
             }
         }
 
-        style->foreground_color = hippo_canvas_context_get_color(style->context, HIPPO_STOCK_COLOR_FG);
+        if (style->parent_style)
+            style->foreground_color = hippo_canvas_style_get_foreground_color(style->parent_style);
+        else
+            style->foreground_color = hippo_canvas_context_get_color(style->context, HIPPO_STOCK_COLOR_FG);
     }
      
     return style->foreground_color;

Modified: trunk/linux/hippo/hippo-canvas-helper.c
==============================================================================
--- trunk/linux/hippo/hippo-canvas-helper.c	(original)
+++ trunk/linux/hippo/hippo-canvas-helper.c	Tue Mar 25 15:09:19 2008
@@ -801,11 +801,11 @@
     
     rgba = gdk_color->red / 256;
     rgba <<= 8;
-    rgba &= gdk_color->green / 256;
+    rgba |= gdk_color->green / 256;
     rgba <<= 8;
-    rgba &= gdk_color->blue / 256;
+    rgba |= gdk_color->blue / 256;
     rgba <<= 8;
-    rgba &= 0xff; /* alpha */
+    rgba |= 0xff; /* alpha */
 
     return rgba;
 }



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