/[ascend]/trunk/pygtk/canvas/blockitem.py
ViewVC logotype

Diff of /trunk/pygtk/canvas/blockitem.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2073 by jpye, Sat Jan 10 00:21:37 2009 UTC revision 2074 by arijit, Fri Sep 4 06:50:08 2009 UTC
# Line 236  class DefaultBlockItem(BlockItem): Line 236  class DefaultBlockItem(BlockItem):
236          nw = self._handles[NW]          nw = self._handles[NW]
237          c.rectangle(nw.x, nw.y, self.width, self.height)          c.rectangle(nw.x, nw.y, self.width, self.height)
238          if context.hovered:          if context.hovered:
239              c.set_source_rgba(.8,.8,1, .8)              try:
240                        c.set_source_rgb(self.blockinstance.color_r,self.blockinstance.color_g,self.blockinstance.color_b)
241                except AttributeError:
242                    c.set_source_rgb(1,1,1)
243                    
244                #c.set_source_rgba(.8,.8,1, .8)
245          else:          else:
246              c.set_source_rgba(1,1,1, .8)              #c.set_source_rgba(1,1,1, .8)
247                    try:
248                        c.set_source_rgb(2*self.blockinstance.color_r,2*self.blockinstance.color_g,2*self.blockinstance.color_b)
249                except AttributeError:
250                    c.set_source_rgb(1,1,1)
251                    
252          c.fill_preserve()          c.fill_preserve()
253          c.set_source_rgb(0,0,0.8)          c.set_source_rgb(0,0,0)
254          c.stroke()          c.stroke()
255    
256          text_center(c,self.width/2,self.height/2,self.blockinstance.name)          text_center(c,self.width/2,self.height/2,self.blockinstance.name)

Legend:
Removed from v.2073  
changed lines
  Added in v.2074

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22