[Sugar-devel] [DESIGN] Width of the TitleEntry widget
Tomeu Vizoso
tomeu at tomeuvizoso.net
Mon Mar 15 02:49:48 EDT 2010
On Fri, Mar 12, 2010 at 22:40, Walter Bender <walter.bender at gmail.com> wrote:
> 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.
Yes, I would set width for the text field in cells and keep the spacer
expanding, as if the rest of the widgets are in whole cells, the
spacer will also be.
Are we already tracking this issue?
Regards,
Tomeu
> -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