[Sugar-devel] [PATCH] Clipboard menu off screen fixed for long text strings(SL #2201)
Aleksey Lim
alsroot at member.fsf.org
Fri Oct 22 15:36:10 EDT 2010
On Fri, Oct 22, 2010 at 11:52:26PM +0530, Mukul Gupta wrote:
> Changing maximum text length to a suitable value so that it
> fits into the screen
> ---
> src/jarabe/frame/clipboardmenu.py | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/jarabe/frame/clipboardmenu.py b/src/jarabe/frame/clipboardmenu.py
> index b998110..1f5259e 100644
> --- a/src/jarabe/frame/clipboardmenu.py
> +++ b/src/jarabe/frame/clipboardmenu.py
> @@ -38,7 +38,7 @@ from jarabe.model import bundleregistry
> class ClipboardMenu(Palette):
>
> def __init__(self, cb_object):
> - Palette.__init__(self, text_maxlen=100)
> + Palette.__init__(self, text_maxlen=80)
I think better to calc number of chars according to the current screen width
w/ something like this:
layout = any_gtk_widget.create_pango_layout(...)
print 'width =', layout.get_pixel_size()[0]
--
Aleksey
More information about the Sugar-devel
mailing list