Use badge-charging on battery icon when charging. #722
This commit is contained in:
parent
1f129e6136
commit
60cd7111c0
1
NEWS
1
NEWS
@ -1,3 +1,4 @@
|
|||||||
|
* #722 Show "charging" badge on battery. (danw)
|
||||||
* #2010 Remember state when scrubbing. (marco)
|
* #2010 Remember state when scrubbing. (marco)
|
||||||
|
|
||||||
Snapshot d38cacfe2c
|
Snapshot d38cacfe2c
|
||||||
|
@ -46,10 +46,13 @@ class DeviceView(canvasicon.CanvasIcon):
|
|||||||
# Update palette
|
# Update palette
|
||||||
if self._model.props.charging:
|
if self._model.props.charging:
|
||||||
status = _STATUS_CHARGING
|
status = _STATUS_CHARGING
|
||||||
|
self.props.badge_name = 'theme:badge-charging'
|
||||||
elif self._model.props.discharging:
|
elif self._model.props.discharging:
|
||||||
status = _STATUS_DISCHARGING
|
status = _STATUS_DISCHARGING
|
||||||
|
self.props.badge_name = None
|
||||||
else:
|
else:
|
||||||
status = _STATUS_FULLY_CHARGED
|
status = _STATUS_FULLY_CHARGED
|
||||||
|
self.props.badge_name = None
|
||||||
|
|
||||||
self._palette.set_level(self._model.props.level)
|
self._palette.set_level(self._model.props.level)
|
||||||
self._palette.set_status(status)
|
self._palette.set_status(status)
|
||||||
|
Loading…
Reference in New Issue
Block a user