[Sugar-devel] [DESIGN] Width of the TitleEntry widget

Sayamindu Dasgupta sayamindu at gmail.com
Thu Mar 11 18:14:59 EST 2010


Hi,
I noticed that in some locales in Sugar 0.84, the "Stop" button
disappear because the translation of the items in "Share with" are
long. I noticed that the TitleEntry widget takes up 1/3 of the screen
width, and the problem goes away for all the problematic locales if
the width is set to 1/4 instead. If a patch would make that clear:

diff --git a/src/sugar/activity/widgets.py b/src/sugar/activity/widgets.py
index 2867666..d42a26b 100644
--- a/src/sugar/activity/widgets.py
+++ b/src/sugar/activity/widgets.py
@@ -186,7 +186,7 @@ class TitleEntry(gtk.ToolItem):
         self._update_title_sid = None

         self.entry = gtk.Entry(**kwargs)
-        self.entry.set_size_request(int(gtk.gdk.screen_width() / 3), -1)
+        self.entry.set_size_request(int(gtk.gdk.screen_width() / 4), -1)
         self.entry.set_text(activity.metadata['title'])
         self.entry.connect('changed', self.__title_changed_cb, activity)
         self.entry.show()


I was wondering if this patch has any obvious drawbacks. I think
disappearance of the Stop button is quite a serious issue and would
prefer to have a slightly truncated (but scrollable) title entry
instead.
Thanks,
Sayamindu


-- 
Sayamindu Dasgupta
[http://sayamindu.randomink.org/ramblings]


More information about the Sugar-devel mailing list