Author: eallen
Date: 2009-03-27 11:00:51 -0400 (Fri, 27 Mar 2009)
New Revision: 3233
Modified:
mgmt/trunk/cumin/python/cumin/charts.py
Log:
Make the letter for the slot state legible
Modified: mgmt/trunk/cumin/python/cumin/charts.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/charts.py 2009-03-27 14:55:20 UTC (rev 3232)
+++ mgmt/trunk/cumin/python/cumin/charts.py 2009-03-27 15:00:51 UTC (rev 3233)
@@ -93,17 +93,14 @@
# draw the state if the slots are big enough
if state and slot_size >= self.min_font:
- #cr.set_source_rgb(interior[0]/10, interior[1]/10, interior[2]/10)
- cr.set_source_rgb(1, 1, 1)
+ cr.set_source_rgb(interior[0]/10, interior[1]/10, interior[2]/10)
cr.select_font_face("verdana", FONT_SLANT_NORMAL,
FONT_WEIGHT_BOLD)
cr.set_font_size(slot_size/3)
width, height = cr.text_extents(state[0])[2:4]
dx = (slot_size / 2) - (width / 2)
dy = (slot_size / 2) + (height / 2)
- if slot_size >= self.min_sphere_size:
- cr.set_source_rgb(*interior)
- else:
+ if slot_size < self.min_sphere_size:
cr.set_source_rgb(1,1,1)
cr.move_to(x + dx, y + dy)
cr.show_text(state[0])