Re: [gtk-list] GtkText: doesn't it bother anyone that... ?



> Doesn't it bother anyone that there is no left _visual_ margin in a
> GtkText widget.  Text slaps right up against the left border, and makes it
> just a tiny bit visually confusing/difficult to pick up the start of a
> line.  There does appear to be a bit of a top margin.  All the apps that I
> _know_ are using GTK have this problem.

   Thanks for the prod. Your message prompted me to add horizontal margins
to the Scintilla source editing widget. There isn't a top margin either. Its
rare to see the accented characters that touch the top of the character box
so what you think is a top margin is just leading. Try putting "ÃÄÅÇg" (hope
the string makes it through the mail handlers - its A with tilde above, A
with umlaut, A with circle above, C with cedilla and g) into widgets to see
how they behave.

> Other apps I use built with other toolkits, I assume, don't have this
> problem.

   Some widgets do and some don't. The editing widget used within Microsoft
Developer Studio does not have margins apart from the optional grey
selection margin.

> I took a look at the GTK guide, and there doesn't seem to be parameters
> for margins in Gtk_Text.  It would seem the only way to get margins for
> Gtk_Text would be to make it borderless and put it within another
> window widget.  The extra work that this takes programmers would seem
> to be excessive since it is not "usually" done.

   Part of the 'Tao of GTK+' is to use widget composition to achieve
features rather than try to stick some of these features into every widget.
Scrolling, for example, can be implemented this way. I don't think that
composition of GtkText inside a margin rectangle is as useful here as mouse
clicks in the margin should go to the text.

   Neil




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