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

Tomeu Vizoso tomeu at tomeuvizoso.net
Fri Mar 12 13:41:29 EST 2010


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?

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
>


More information about the Sugar-devel mailing list