Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar
This commit is contained in:
commit
e3bab8cd12
@ -20,6 +20,7 @@ from gettext import gettext as _
|
||||
import hippo
|
||||
|
||||
from sugar.graphics.menu import Menu, MenuItem
|
||||
from sugar.graphics import color
|
||||
from sugar.graphics.iconbutton import IconButton
|
||||
import sugar
|
||||
|
||||
@ -79,19 +80,27 @@ class ZoomBox(hippo.CanvasBox):
|
||||
self._popup_context = popup_context
|
||||
self._activity_icon = None
|
||||
|
||||
icon = IconButton(icon_name='theme:stock-zoom-mesh')
|
||||
icon = IconButton(icon_name='theme:stock-zoom-mesh',
|
||||
stroke_color=color.BLACK,
|
||||
fill_color=color.WHITE)
|
||||
icon.connect('activated', self._level_clicked_cb, sugar.ZOOM_MESH)
|
||||
self.append(icon)
|
||||
|
||||
icon = IconButton(icon_name='theme:stock-zoom-friends')
|
||||
icon = IconButton(icon_name='theme:stock-zoom-friends',
|
||||
stroke_color=color.BLACK,
|
||||
fill_color=color.WHITE)
|
||||
icon.connect('activated', self._level_clicked_cb, sugar.ZOOM_FRIENDS)
|
||||
self.append(icon)
|
||||
|
||||
icon = IconButton(icon_name='theme:stock-zoom-home')
|
||||
icon = IconButton(icon_name='theme:stock-zoom-home',
|
||||
stroke_color=color.BLACK,
|
||||
fill_color=color.WHITE)
|
||||
icon.connect('activated', self._level_clicked_cb, sugar.ZOOM_HOME)
|
||||
self.append(icon)
|
||||
|
||||
icon = IconButton(icon_name='theme:stock-zoom-activity')
|
||||
icon = IconButton(icon_name='theme:stock-zoom-activity',
|
||||
stroke_color=color.BLACK,
|
||||
fill_color=color.WHITE)
|
||||
icon.connect('activated', self._level_clicked_cb, sugar.ZOOM_ACTIVITY)
|
||||
self.append(icon)
|
||||
|
||||
|
@ -47,7 +47,8 @@ class Button(hippo.CanvasBox, hippo.CanvasItem):
|
||||
self._round_box.props.background_color = color.BLACK.get_int()
|
||||
self._round_box.props.padding_top = units.points_to_pixels(1)
|
||||
self._round_box.props.padding_bottom = units.points_to_pixels(1)
|
||||
|
||||
self._round_box.props.spacing = units.points_to_pixels(3)
|
||||
|
||||
self._text_box = hippo.CanvasText()
|
||||
self._text_box.props.font_desc = font.DEFAULT.get_pango_desc()
|
||||
self._text_box.props.color = color.BUTTON_NORMAL.get_int()
|
||||
@ -87,8 +88,8 @@ class Button(hippo.CanvasBox, hippo.CanvasItem):
|
||||
else:
|
||||
self._icon = CanvasIcon(icon_name=value,
|
||||
scale=units.SMALL_ICON_SCALE,
|
||||
fill_color=color.WHITE,
|
||||
stroke_color=color.BLACK)
|
||||
fill_color=color.BLACK,
|
||||
stroke_color=color.WHITE)
|
||||
# Insert icon on the label's left
|
||||
self._round_box.remove_all()
|
||||
self._round_box.append(self._icon)
|
||||
|
@ -102,9 +102,7 @@ class IconButton(CanvasIcon):
|
||||
def prelight(self, enter):
|
||||
if enter:
|
||||
if self._active:
|
||||
self.props.fill_color = color.BLACK
|
||||
self.props.background_color = color.BLACK.get_int()
|
||||
else:
|
||||
if self._active:
|
||||
self.props.fill_color = self._normal_fill_color
|
||||
self.props.background_color = self._normal_background_color
|
||||
|
Loading…
Reference in New Issue
Block a user