Add hover to ClipboardIcon.
This commit is contained in:
parent
52fc6826ab
commit
940b50b4e6
@ -4,6 +4,7 @@ from sugar.graphics.canvasicon import CanvasIcon
|
|||||||
from view.clipboardmenu import ClipboardMenu
|
from view.clipboardmenu import ClipboardMenu
|
||||||
from sugar.graphics.xocolor import XoColor
|
from sugar.graphics.xocolor import XoColor
|
||||||
from sugar.graphics import units
|
from sugar.graphics import units
|
||||||
|
from sugar.graphics import color
|
||||||
from sugar.activity import activityfactory
|
from sugar.activity import activityfactory
|
||||||
from sugar.clipboard import clipboardservice
|
from sugar.clipboard import clipboardservice
|
||||||
from sugar import util
|
from sugar import util
|
||||||
@ -81,3 +82,9 @@ class ClipboardIcon(CanvasIcon):
|
|||||||
|
|
||||||
def get_object_id(self):
|
def get_object_id(self):
|
||||||
return self._object_id
|
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()
|
||||||
|
@ -35,6 +35,7 @@ class ClipboardMenu(Menu):
|
|||||||
|
|
||||||
def __init__(self, name, percent, preview, activity):
|
def __init__(self, name, percent, preview, activity):
|
||||||
Menu.__init__(self, name)
|
Menu.__init__(self, name)
|
||||||
|
self.props.border = 0
|
||||||
|
|
||||||
if percent < 100:
|
if percent < 100:
|
||||||
self._progress_bar = ClipboardProgressBar(percent)
|
self._progress_bar = ClipboardProgressBar(percent)
|
||||||
|
Loading…
Reference in New Issue
Block a user