Remove obsolete sugar.graphics.color.

This commit is contained in:
Marco Pesenti Gritti
2007-07-31 14:05:14 +02:00
parent 1845435e8c
commit cca69e7012
16 changed files with 64 additions and 204 deletions
+2 -10
View File
@@ -25,7 +25,6 @@ import hippo
import dbus
from sugar.graphics import units
from sugar.graphics import color
from sugar.graphics.xocolor import XoColor
from sugar.graphics.palette import Palette, CanvasInvoker
from sugar import profile
@@ -81,16 +80,9 @@ class HomeBox(hippo.CanvasBox, hippo.CanvasItem):
self._remove_device(device)
def _shell_state_changed_cb(self, model, pspec):
# FIXME handle all possible mode switches
# FIXME implement this
if model.props.state == ShellModel.STATE_SHUTDOWN:
if self._donut:
self.remove(self._donut)
self._donut = None
self._my_icon.props.stroke_color = color.ICON_STROKE_INACTIVE
self._my_icon.props.fill_color = \
color.ICON_FILL_INACTIVE
self._my_icon.props.background_color = \
color.ICON_FILL_INACTIVE.get_int()
pass
def do_allocate(self, width, height, origin_changed):
hippo.CanvasBox.do_allocate(self, width, height, origin_changed)
+21 -21
View File
@@ -22,7 +22,7 @@ from gettext import gettext as _
from sugar.graphics.spreadlayout import SpreadLayout
from sugar.graphics.canvasicon import CanvasIcon
from sugar.graphics import color
from sugar.graphics import style
from sugar.graphics import xocolor
from sugar.graphics import canvasicon
from sugar.graphics import units
@@ -95,24 +95,24 @@ class AccessPointView(PulsingIcon):
if self._model.props.state == accesspointmodel.STATE_CONNECTING:
self.props.pulse_time = 1.0
self.props.colors = [
[ color.HTMLColor(self._device_stroke),
color.HTMLColor(self._device_fill) ],
[ color.HTMLColor(self._device_stroke),
color.HTMLColor('#e2e2e2') ]
[ style.Color(self._device_stroke),
style.Color(self._device_fill) ],
[ style.Color(self._device_stroke),
style.Color('#e2e2e2') ]
]
elif self._model.props.state == accesspointmodel.STATE_CONNECTED:
self.props.pulse_time = 2.0
self.props.colors = [
[ color.HTMLColor(self._device_stroke),
color.HTMLColor(self._device_fill) ],
[ color.HTMLColor('#ffffff'),
color.HTMLColor(self._device_fill) ]
[ style.Color(self._device_stroke),
style.Color(self._device_fill) ],
[ style.Color('#ffffff'),
style.Color(self._device_fill) ]
]
elif self._model.props.state == accesspointmodel.STATE_NOTCONNECTED:
self.props.pulse_time = 0.0
self.props.colors = [
[ color.HTMLColor(self._device_stroke),
color.HTMLColor(self._device_fill) ]
[ style.Color(self._device_stroke),
style.Color(self._device_fill) ]
]
@@ -146,24 +146,24 @@ class MeshDeviceView(PulsingIcon):
if state == nmclient.DEVICE_STATE_ACTIVATING:
self.props.pulse_time = 0.75
self.props.colors = [
[ color.HTMLColor(self._device_stroke),
color.HTMLColor(self._device_fill) ],
[ color.HTMLColor(self._device_stroke),
color.HTMLColor('#e2e2e2') ]
[ style.Color(self._device_stroke),
style.Color(self._device_fill) ],
[ style.Color(self._device_stroke),
style.Color('#e2e2e2') ]
]
elif state == nmclient.DEVICE_STATE_ACTIVATED:
self.props.pulse_time = 1.5
self.props.colors = [
[ color.HTMLColor(self._device_stroke),
color.HTMLColor(self._device_fill) ],
[ color.HTMLColor('#ffffff'),
color.HTMLColor(self._device_fill) ]
[ style.Color(self._device_stroke),
style.Color(self._device_fill) ],
[ style.Color('#ffffff'),
style.Color(self._device_fill) ]
]
elif state == nmclient.DEVICE_STATE_INACTIVE:
self.props.pulse_time = 0.0
self.props.colors = [
[ color.HTMLColor(self._device_stroke),
color.HTMLColor(self._device_fill) ]
[ style.Color(self._device_stroke),
style.Color(self._device_fill) ]
]
class ActivityView(hippo.CanvasBox):