[Bugs] #4221 sugar NORM: Hover effect stays after changing zoom views with keyboard shortcuts

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Thu Mar 14 06:16:05 EDT 2013


#4221: Hover effect stays after changing zoom views with keyboard shortcuts
-----------------------+----------------------------------------------------
    Reporter:  erikos  |          Owner:  erikos     
        Type:  defect  |         Status:  assigned   
    Priority:  Normal  |      Milestone:  0.98       
   Component:  sugar   |        Version:  Unspecified
    Severity:  Major   |       Keywords:  regression 
Distribution:  OLPC    |   Status_field:  Assigned   
-----------------------+----------------------------------------------------

Comment(by erikos):

 The following patch covers point (a):

 {{{
 diff --git a/src/jarabe/desktop/transitionbox.py
 b/src/jarabe/desktop/transitionbox.py
 index b124b14..3f8650a 100644
 --- a/src/jarabe/desktop/transitionbox.py
 +++ b/src/jarabe/desktop/transitionbox.py
 @@ -18,9 +18,9 @@ from gi.repository import GObject

  from sugar3.graphics import style
  from sugar3.graphics import animator
 +from sugar3.graphics.icon import Icon

  from jarabe.model.buddy import get_owner_instance
 -from jarabe.view.buddyicon import BuddyIcon
  from jarabe.desktop.viewcontainer import ViewContainer
  from jarabe.desktop.favoriteslayout import SpreadLayout

 @@ -49,8 +49,10 @@ class TransitionBox(ViewContainer):
          layout = SpreadLayout()

          # Round off icon size to an even number to ensure that the icon
 -        self._owner_icon = BuddyIcon(buddy=get_owner_instance(),
 -                                     pixel_size=style.XLARGE_ICON_SIZE &
 ~1)
 +        owner = get_owner_instance()
 +        self._owner_icon = Icon(icon_name='computer-xo',
 +                                xo_color=owner.get_color(),
 +                                pixel_size=style.XLARGE_ICON_SIZE & ~1)
          ViewContainer.__init__(self, layout, self._owner_icon)

          self._animator = animator.Animator(0.3)
 }}}

 The icon in the transition box does not need to be a canvas icon that
 reacts to input. It can be an icon only. That helps us to not trigger any
 visual hover feedback for that icon.

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/4221#comment:9>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list