[sugar] [PATCH] tweak battery charging (progress) bar

Martin Dengler martin
Fri Apr 25 19:50:58 EDT 2008


1. battery charging (progress) bar (and thus the palette) made wider, consistent with widths in new design (in http://wiki.laptop.org/go/Designs/Frame#06 the palette is almost exactly 4 frame icons wide).
2. charge percentage palette text left in always, even when charged, 'cause Eben doesn't like when it goes away.
---
 src/view/devices/battery.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/view/devices/battery.py b/src/view/devices/battery.py
index a97d014..ab2df8f 100644
--- a/src/view/devices/battery.py
+++ b/src/view/devices/battery.py
@@ -95,6 +95,10 @@ class BatteryPalette(Palette):
 
         self.set_content(vbox)
 
+        self._progress_bar.set_size_request(
+            style.zoom(style.GRID_CELL_SIZE * 4), -1)
+                                            
+
     def set_level(self, percent):
         self._level = percent
         fraction = percent / 100.0
@@ -120,7 +124,6 @@ class BatteryPalette(Palette):
                                        'min': remaining_minpart})
         else:
             secondary_text = _('Charged')
-            status_text = ''
 
         self.props.secondary_text = secondary_text
         self._status_label.set_text(status_text)
-- 
1.5.4.1




More information about the Sugar-devel mailing list