Ticket #4221: 0001-TransitionBox-replace-the-CanvasIcon-with-an-Icon-pa.patch

File 0001-TransitionBox-replace-the-CanvasIcon-with-an-Icon-pa.patch, 1.8 KB (added by erikos, 11 years ago)

TransitionBox: replace the CanvasIcon with an Icon

  • src/jarabe/desktop/transitionbox.py

    From 1ed6f3c9a7e017b21f616dafd79287ddb9094c7b Mon Sep 17 00:00:00 2001
    From: Simon Schampijer <simon@laptop.org>
    Date: Thu, 14 Mar 2013 12:13:51 +0100
    Subject: [PATCH] TransitionBox: replace the CanvasIcon with an Icon, part of
     SL #4221
    
    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.
    
    Signed-off-by: Simon Schampijer <simon@laptop.org>
    ---
     src/jarabe/desktop/transitionbox.py | 8 +++++---
     1 file changed, 5 insertions(+), 3 deletions(-)
    
    diff --git a/src/jarabe/desktop/transitionbox.py b/src/jarabe/desktop/transitionbox.py
    index b124b14..3f8650a 100644
    a b from gi.repository import GObject 
    1818
    1919from sugar3.graphics import style
    2020from sugar3.graphics import animator
     21from sugar3.graphics.icon import Icon
    2122
    2223from jarabe.model.buddy import get_owner_instance
    23 from jarabe.view.buddyicon import BuddyIcon
    2424from jarabe.desktop.viewcontainer import ViewContainer
    2525from jarabe.desktop.favoriteslayout import SpreadLayout
    2626
    class TransitionBox(ViewContainer): 
    4949        layout = SpreadLayout()
    5050
    5151        # Round off icon size to an even number to ensure that the icon
    52         self._owner_icon = BuddyIcon(buddy=get_owner_instance(),
    53                                      pixel_size=style.XLARGE_ICON_SIZE & ~1)
     52        owner = get_owner_instance()
     53        self._owner_icon = Icon(icon_name='computer-xo',
     54                                xo_color=owner.get_color(),
     55                                pixel_size=style.XLARGE_ICON_SIZE & ~1)
    5456        ViewContainer.__init__(self, layout, self._owner_icon)
    5557
    5658        self._animator = animator.Animator(0.3)