deskbar-applet r2108 - in trunk: . deskbar/ui/cuemiac



Author: sebp
Date: Sun Apr 13 12:48:20 2008
New Revision: 2108
URL: http://svn.gnome.org/viewvc/deskbar-applet?rev=2108&view=rev

Log:
Use theme's dark color instead of bg when in prelight state. The arrow has always the height of the font size. That way we don't end up with huge arrows when matches take more than one line.

Modified:
   trunk/ChangeLog
   trunk/deskbar/ui/cuemiac/CuemiacCellRendererAction.py

Modified: trunk/deskbar/ui/cuemiac/CuemiacCellRendererAction.py
==============================================================================
--- trunk/deskbar/ui/cuemiac/CuemiacCellRendererAction.py	(original)
+++ trunk/deskbar/ui/cuemiac/CuemiacCellRendererAction.py	Sun Apr 13 12:48:20 2008
@@ -115,17 +115,7 @@
         cr.close_path()
         
         cr.fill()
-   
-    def _shift_color (self, color, amount):
-        """
-        @type color: gtk.gdk.Color
-        """
-        r = color.red + amount
-        g = color.green + amount
-        b = color.blue + amount
-        
-        return gtk.gdk.Color (r, g, b, color.pixel)
-   
+    
     def render_match (self, window, widget, background_area, cell_area, expose_area, flags):
         """
         Renders an arrow
@@ -133,12 +123,13 @@
         state = self.renderer_state_to_widget_state(flags)
         
         if state & gtk.STATE_PRELIGHT:
-            color = color = widget.style.bg[state]
+            color = color = widget.style.dark[state]
         else:
             color = color = widget.style.fg[state]
         
         arrow_width = cell_area.width / 2
-        arrow_height = cell_area.height / 2
+        # Set the arrow height to the current font size in pixels
+        arrow_height = widget.get_pango_context().get_font_description().get_size() / pango.SCALE
         
         self._draw_arrow_right(window, color, state, cell_area,
                                cell_area.x + cell_area.width / 2,



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