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

Walter Bender walter.bender at gmail.com
Fri Mar 12 16:40:39 EST 2010


On Fri, Mar 12, 2010 at 1:41 PM, Tomeu Vizoso <tomeu at tomeuvizoso.net> wrote:
> On Fri, Mar 12, 2010 at 00:14, Sayamindu Dasgupta <sayamindu at gmail.com> wrote:
>> 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()
>
> Shouldn't we be setting a fixed width expressed in grid cells?

Yes... but the horizontal-rule spacer has always violated the grid. So
maybe the spacer and title should  be together aligned to the grid.

-walter

> http://wiki.sugarlabs.org/go/Human_Interface_Guidelines/The_Sugar_Interface/Layout_Guidelines
>
> Regards,
>
> Tomeu
>
>>
>> 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]
>> _______________________________________________
>> Sugar-devel mailing list
>> Sugar-devel at lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>



-- 
Walter Bender
Sugar Labs
http://www.sugarlabs.org


More information about the Sugar-devel mailing list