[Bugs] #636 UNSP: icon frame does overlap (favorites view)

SugarLabs Bugs bugtracker-noreply at sugarlabs.org
Thu Mar 26 05:25:32 EDT 2009


#636: icon frame does overlap (favorites view)
------------------------------------------+---------------------------------
    Reporter:  erikos                     |          Owner:  tomeu      
        Type:  defect                     |         Status:  new        
    Priority:  Unspecified by Maintainer  |      Milestone:  0.84       
   Component:  sugar                      |        Version:  0.84.x     
    Severity:  Critical                   |     Resolution:             
    Keywords:                             |   Distribution:  Unspecified
Status_field:  New                        |  
------------------------------------------+---------------------------------

Comment(by erikos):

 one first guess by tomeu was a rounding issue:

 {{{
 diff --git a/src/jarabe/desktop/favoriteslayout.py
 b/src/jarabe/desktop/favoriteslayout.py
 index 506446f..4228553 100644
 --- a/src/jarabe/desktop/favoriteslayout.py
 +++ b/src/jarabe/desktop/favoriteslayout.py
 @@ -242,10 +242,10 @@ class RingLayout(FavoritesLayout):
      def _calculate_position(self, radius, icon_size, index,
 children_count,
                              sin=math.sin, cos=math.cos):
          width, height = self.box.get_allocation()
 -        angle = index * (2 * math.pi / children_count) - math.pi / 2
 -        x = radius * cos(angle) + (width - icon_size) / 2
 +        angle = index * (2 * math.pi / children_count) - math.pi / 2.0
 +        x = radius * cos(angle) + (width - icon_size) / 2.0
          y = radius * sin(angle) + (height - icon_size -
 -                                   (style.GRID_CELL_SIZE/2) ) / 2
 +                                   (style.GRID_CELL_SIZE / 2.0) ) / 2.0
          return x, y

      def _get_children_in_ring(self):
 }}}

-- 
Ticket URL: <http://dev.sugarlabs.org/ticket/636#comment:1>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list