[Dillo-dev]form fields too narrow
Hello, it seems that dillo renders all text input fields in forms one character too narrow, for example on: http://www.efa.de/gvh/XSLT_TRIP_REQUEST2?language=en we have: <INPUT NAME="itdTimeHour" VALUE="17" SIZE="2" MAXLENGTH="2" ...> (field for the hour of the time) which clearly requests to be two charcters, but ends up having space for only one, making it hard to use (horizontal scrolling). in the source (html.c) i found: if ((attrbuf = Html_get_attr(html, tag, tagsize, "size"))) gtk_widget_set_usize(widget, strtol(attrbuf, NULL, 10) * gdk_char_width(widget->style->font, '0'), 0); which makes the fields too narrow... changing it to (1+strtol(attrbuf, NULL, 10)) fixes the problem. i can only assume that 'gtk_widget_set_usize' sets the *outside* dimensions of the widget? (or that something else is off there...) - Thorben
Hi Thorben, On Wed, Jul 14, 2004 at 06:05:24PM +0200, Thorben Thuermer wrote:
Hello,
it seems that dillo renders all text input fields in forms one character too narrow, for example on: http://www.efa.de/gvh/XSLT_TRIP_REQUEST2?language=en we have: <INPUT NAME="itdTimeHour" VALUE="17" SIZE="2" MAXLENGTH="2" ...> (field for the hour of the time) which clearly requests to be two charcters, but ends up having space for only one, making it hard to use (horizontal scrolling).
in the source (html.c) i found: if ((attrbuf = Html_get_attr(html, tag, tagsize, "size"))) gtk_widget_set_usize(widget, strtol(attrbuf, NULL, 10) * gdk_char_width(widget->style->font, '0'), 0);
which makes the fields too narrow... changing it to (1+strtol(attrbuf, NULL, 10)) fixes the problem. i can only assume that 'gtk_widget_set_usize' sets the *outside* dimensions of the widget? (or that something else is off there...)
Done! I couldn't find anything hintful in the doc nor the source of gtk_widget_set_usize(). Anyway, tests showed it to work OK, so it's commited now. Thanks Jorge.- PS: Sorry for the delay.
participants (2)
-
Jorge Arellano Cid
-
Thorben Thuermer