Add hover to ClipboardIcon.

This commit is contained in:
Tomeu Vizoso 2007-02-24 14:35:31 +01:00
parent 52fc6826ab
commit 940b50b4e6
2 changed files with 9 additions and 1 deletions

View File

@ -4,6 +4,7 @@ from sugar.graphics.canvasicon import CanvasIcon
from view.clipboardmenu import ClipboardMenu
from sugar.graphics.xocolor import XoColor
from sugar.graphics import units
from sugar.graphics import color
from sugar.activity import activityfactory
from sugar.clipboard import clipboardservice
from sugar import util
@ -81,3 +82,9 @@ class ClipboardIcon(CanvasIcon):
def get_object_id(self):
return self._object_id
def prelight(self, enter):
if enter:
self.props.background_color = color.BLACK.get_int()
else:
self.props.background_color = color.TOOLBAR_BACKGROUND.get_int()

View File

@ -35,6 +35,7 @@ class ClipboardMenu(Menu):
def __init__(self, name, percent, preview, activity):
Menu.__init__(self, name)
self.props.border = 0
if percent < 100:
self._progress_bar = ClipboardProgressBar(percent)