Re: [gtk-list] GtkEntry and justification




Johan Hanson <johan@obsession.se> writes:

> Feature request:
> 
> * gtk_entry_justify (GtkJustification justification).
>   With obvious semantics. I would be happy if just left and right justification
>   were supported.
> 
> * A numerical GtKSpinButton should be right-justified by default.
>   As you all know, numbers grow to the left.
> 
> * Justification for GtkEntry adjusted by the current locale.
>   Arabic and hebrew: Right-justified by default.
>   Western languages: Left-justified by default.

Well, support for right-justification while entering Arabic and Hebrew
will definitely be part of the support for RTL text that will be in
GTK+ 1.4.

Since GTK+-1.4 will allow per-widget setting of the primary direction,
you could get right-justification of arbitrary entries for non-RTL
languages with:

 gtk_widget_set_direction (entry, GTK_DIRECTION_RTL);

But this is not really going to give you the right behavior, when
using split/dual cursors, since when you are at the beginning of the
number string, a split cursor will be visible, which would be quite
confusing to somebody used to LTR languages.

I'm not sure if right-justification in a more general sense is a
useful feature. While numbers are sometimes right justified for
alignment and in settings such as calculators, this usage isn't (in my
experience) customary for number fields.

And letting it be up to the whim of the application programmer is a
bad idea, because applications won't be consistent in the usage. (We
can make it always right-align for spin-buttons, but what about other
numeric entries?)

Regards,
                                        Owen



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