[Sugar-devel] Reg.: Ticket 1429
Walter Bender
walter.bender at gmail.com
Tue Dec 16 12:25:45 EST 2014
Of course, where we want to override the default we can, but defining
the default in the toolkit can only help lead to more consistency.
Glad this is landing.
On Tue, Dec 16, 2014 at 11:36 AM, Gonzalo Odiard <godiard at sugarlabs.org> wrote:
> Ok Goutam,
> Looks like there are consensus.
> Could you add a constant in style.py like
>
> ELLIPSIZE_MODE_DEFAULT = Pango.EllipsizeMode.END
>
> and replace the use of the gtk constants in sugar-tookit-gtk3 and sugar?
>
> Gonzalo
>
> On Tue, Dec 16, 2014 at 1:05 PM, Martin Abente
> <martin.abente.lahaye at gmail.com> wrote:
>>
>> There might be cases where a particular ellipse fits better, but I
>> personally would prefer a general consistency. As Gonzalo mentioned, we
>> don't rely on file extensions, so END would be fitter choice.
>>
>> On Mon, Dec 15, 2014 at 6:14 PM, Walter Bender <walter.bender at gmail.com>
>> wrote:
>>>
>>> I am happy with defaulting to END but I think we should define a
>>> constant in style.py.
>>>
>>> -walter
>>>
>>> On Mon, Dec 15, 2014 at 2:49 PM, Gonzalo Odiard <godiard at sugarlabs.org>
>>> wrote:
>>> > Hello,
>>> > Thanks for working on this issue.
>>> >
>>> > I think we should use Pango.EllipsizeMode.END always to be consistent.
>>> > In particular, when the text is short, like in the palettes, ellipsize
>>> > MIDDLE
>>> > does not provide a good output. Also, we do a ellipsize "by hand"
>>> > in multiple lines in the secondary text on the pallettes.
>>> >
>>> > But looking at the code, we have:
>>> >
>>> > In the toolkit:
>>> > [gonzalo at localhost sugar-toolkit-gtk3]$ grep -r "Pango.EllipsizeMode."
>>> > *
>>> > --include=*.py
>>> > src/sugar3/graphics/palettemenu.py:
>>> > self.label.set_ellipsize(Pango.EllipsizeMode.MIDDLE)
>>> > src/sugar3/graphics/menuitem.py:
>>> > label.set_ellipsize(Pango.EllipsizeMode.MIDDLE)
>>> > src/sugar3/graphics/palette.py:
>>> > self._label.set_ellipsize(Pango.EllipsizeMode.MIDDLE)
>>> > src/sugar3/graphics/palette.py:
>>> > self._secondary_label.set_ellipsize(Pango.EllipsizeMode.END)
>>> >
>>> > In sugar:
>>> > [gonzalo at localhost sugar]$ grep -r "Pango.EllipsizeMode." *
>>> > --include=*.py
>>> > extensions/cpsection/keyboard/view.py: cell.props.ellipsize =
>>> > Pango.EllipsizeMode.MIDDLE
>>> > extensions/cpsection/keyboard/view.py: cell.props.ellipsize =
>>> > Pango.EllipsizeMode.MIDDLE
>>> > extensions/cpsection/keyboard/view.py: cell.props.ellipsize =
>>> > Pango.EllipsizeMode.MIDDLE
>>> > extensions/cpsection/keyboard/view.py: cell.props.ellipsize =
>>> > Pango.EllipsizeMode.MIDDLE
>>> > src/jarabe/controlpanel/inlinealert.py:
>>> > self._msg_label.set_ellipsize(Pango.EllipsizeMode.MIDDLE)
>>> > src/jarabe/journal/journaltoolbox.py:
>>> > self._label_widget.set_ellipsize(Pango.EllipsizeMode.MIDDLE)
>>> > src/jarabe/journal/listview.py: self.cell_title.props.ellipsize
>>> > =
>>> > Pango.EllipsizeMode.MIDDLE
>>> > src/jarabe/desktop/activitieslist.py: cell_text.props.ellipsize
>>> > =
>>> > Pango.EllipsizeMode.MIDDLE
>>> > src/jarabe/frame/notification.py:
>>> > summary_label.set_ellipsize(Pango.EllipsizeMode.END)
>>> > src/jarabe/frame/notification.py:
>>> > body_label.set_ellipsize(Pango.EllipsizeMode.END)
>>> > src/jarabe/frame/activitiestray.py:
>>> > label.set_ellipsize(Pango.EllipsizeMode.END)
>>> >
>>> > The only explanation I found to use ellipsize MIDDLE is need show by
>>> > example
>>> > a file extension in a file manager. But Sugar does not use file
>>> > extensions
>>> > in the Journal,
>>> > only in external devices.
>>> >
>>> > What others think?
>>> >
>>> > Gonzalo
>>> >
>>> >
>>> >
>>> >
>>> > On Mon, Dec 15, 2014 at 4:32 PM, Goutam Nair <goutamnair7 at gmail.com>
>>> > wrote:
>>> >>
>>> >> Hey all,
>>> >>
>>> >> For this bug http://bugs.sugarlabs.org/ticket/1429, when the cursor
>>> >> hovers
>>> >> over the activity icon the ellipses are in the middle when it is
>>> >> supposed to
>>> >> be at the end.
>>> >>
>>> >> So, in order to fix that, should I have to change this file as well:
>>> >> sugar3/graphics/palette.py on line 143?
>>> >>
>>> >> Thanks
>>> >> Goutam Nair
>>> >>
>>> >> _______________________________________________
>>> >> Sugar-devel mailing list
>>> >> Sugar-devel at lists.sugarlabs.org
>>> >> http://lists.sugarlabs.org/listinfo/sugar-devel
>>> >>
>>> >
>>> >
>>> > --
>>> > Gonzalo Odiard
>>> >
>>> > SugarLabs - Software for children learning
>>> >
>>> > _______________________________________________
>>> > 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
>>> _______________________________________________
>>> 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
>>
>
>
> --
> Gonzalo Odiard
>
> SugarLabs - Software for children learning
--
Walter Bender
Sugar Labs
http://www.sugarlabs.org
More information about the Sugar-devel
mailing list