Re: padding cleanup

On Wed, Sep 1, 2010 at 2:52 PM, Havoc Pennington <hp pobox com> wrote:
> Hi,
> On Wed, Sep 1, 2010 at 2:03 PM, Shaun McCance <shaunm gnome org> wrote:
>> Well, all of the packing functions use start and end, but I
>> guess that's just to make the term orientation-neutral.
>> Looking through the docs, I do see properties like left-attach,
>> left-margin, and left-padding. So it doesn't make sense to use
>> start and end unless we switch all terminology. That's probably
>> just pointless API churn.
>> Side note: browsers are starting to provide properties using
>> start and end:
> Well, what does GtkAlignment do already with its padding?
> I think the question is, does GTK just flip left and right, or does
> GTK let you choose to force left/right regardless of text direction
> and then also let you "virtualize" with start/end. I'd guess the
> browsers are not comfortable / unable to just flip all lefts and
> rights so they are adding new props for auto-flipping padding.
> The problem is if you have something called left or right which does
> NOT auto-flip, people will use it, and then be broken in RTL.
> I'd almost be inclined to have foo-left, foo-right which flip and then
> _if there's a use-case_ foo-left-in-all-text-directions and
> foo-right-in-all-text-directions which don't flip. But I don't know
> much about it, honestly. However it works, the obvious, default thing
> app developers will do probably ought to work by default in RTL. I
> kind of suspect padding-left and padding-right are the obvious default
> thing app devs will use.

Right. We generally don't have a choice between follow-text-direction
and hardcoded-left, anywhere currently. We just 'flip where it makes
sense'. And that works okayish.

Except for a few things where it really depends on the context. E.g
you can have an GTK_ARROW_LEFT arrow that says: "The beginning of the
paragraph is there..." or you can have have one that says "please turn
your head left". For the first one, you want flipping, for second one,
you don't, since even in RTL-locales, left is still left...

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]