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

Martin Dengler martin
Fri Apr 25 20:17:26 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 |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/view/devices/battery.py b/src/view/devices/battery.py
index a97d014..e17de81 100644
--- a/src/view/devices/battery.py
+++ b/src/view/devices/battery.py
@@ -82,6 +82,8 @@ class BatteryPalette(Palette):
     def __init__(self, primary_text):
         Palette.__init__(self, primary_text)
             
+        self.set_size_request(style.zoom(style.GRID_CELL_SIZE * 4), -1)
+
         self._level = 0
         self._progress_bar = gtk.ProgressBar()
         self._progress_bar.show()
@@ -120,7 +122,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