Some more icon fixes.
This commit is contained in:
parent
0dbb456a5a
commit
94d624e26c
@ -16,14 +16,14 @@
|
|||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
from sugar import profile
|
from sugar import profile
|
||||||
from sugar.graphics import canvasicon
|
from sugar.graphics.icon import CanvasIcon
|
||||||
from sugar.graphics import style
|
from sugar.graphics import style
|
||||||
from model.devices import device
|
from model.devices import device
|
||||||
|
|
||||||
class DeviceView(canvasicon.CanvasIcon):
|
class DeviceView(CanvasIcon):
|
||||||
def __init__(self, model):
|
def __init__(self, model):
|
||||||
canvasicon.CanvasIcon.__init__(self, size=style.MEDIUM_ICON_SIZE,
|
CanvasIcon.__init__(self, size=style.MEDIUM_ICON_SIZE,
|
||||||
icon_name='network-mesh')
|
icon_name='network-mesh')
|
||||||
self._model = model
|
self._model = model
|
||||||
|
|
||||||
model.connect('notify::state', self._state_changed_cb)
|
model.connect('notify::state', self._state_changed_cb)
|
||||||
|
@ -145,24 +145,24 @@ class MeshDeviceView(PulsingIcon):
|
|||||||
if state == nmclient.DEVICE_STATE_ACTIVATING:
|
if state == nmclient.DEVICE_STATE_ACTIVATING:
|
||||||
self.props.pulse_time = 0.75
|
self.props.pulse_time = 0.75
|
||||||
self.props.colors = [
|
self.props.colors = [
|
||||||
[ style.Color(self._device_stroke),
|
[ style.Color(self._device_stroke).get_svg(),
|
||||||
style.Color(self._device_fill) ],
|
style.Color(self._device_fill).get_svg() ],
|
||||||
[ style.Color(self._device_stroke),
|
[ style.Color(self._device_stroke).get_svg(),
|
||||||
style.Color('#e2e2e2') ]
|
'#e2e2e2' ]
|
||||||
]
|
]
|
||||||
elif state == nmclient.DEVICE_STATE_ACTIVATED:
|
elif state == nmclient.DEVICE_STATE_ACTIVATED:
|
||||||
self.props.pulse_time = 1.5
|
self.props.pulse_time = 1.5
|
||||||
self.props.colors = [
|
self.props.colors = [
|
||||||
[ style.Color(self._device_stroke),
|
[ style.Color(self._device_stroke).get_svg(),
|
||||||
style.Color(self._device_fill) ],
|
style.Color(self._device_fill).get_svg() ],
|
||||||
[ style.Color('#ffffff'),
|
[ '#ffffff',
|
||||||
style.Color(self._device_fill) ]
|
style.Color(self._device_fill).get_svg() ]
|
||||||
]
|
]
|
||||||
elif state == nmclient.DEVICE_STATE_INACTIVE:
|
elif state == nmclient.DEVICE_STATE_INACTIVE:
|
||||||
self.props.pulse_time = 0.0
|
self.props.pulse_time = 0.0
|
||||||
self.props.colors = [
|
self.props.colors = [
|
||||||
[ style.Color(self._device_stroke),
|
[ style.Color(self._device_stroke).get_svg(),
|
||||||
style.Color(self._device_fill) ]
|
style.Color(self._device_fill).get_svg() ]
|
||||||
]
|
]
|
||||||
|
|
||||||
class ActivityView(hippo.CanvasBox):
|
class ActivityView(hippo.CanvasBox):
|
||||||
|
Loading…
Reference in New Issue
Block a user