After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 6152 - entry/text widgets should let you set size in chars
entry/text widgets should let you set size in chars
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
1.3.x
Other other
: Normal enhancement
: ---
Assigned To: Havoc Pennington
Havoc Pennington
Depends on:
Blocks:
 
 
Reported: 2000-02-11 20:10 UTC by Havoc Pennington
Modified: 2011-02-04 16:09 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Havoc Pennington 2001-01-27 19:47:19 UTC
Package: gtk+
Version: 1.2.x
Severity: wishlist

Should be able to set the size of entry and text widgets in character
units, rather than pixels. Right now to do things correctly you have
to get widget->style->font and measure a string and then set usize 
with pixels.

Havoc




------- Bug moved to this database by debbugs-export@bugzilla.gnome.org 2001-01-27 14:47 -------
This bug was previously known as bug 6152 at http://bugs.gnome.org/
http://bugs.gnome.org/show_bug.cgi?id=6152
Originally filed under the gtk+ product and general component.

Reassigning to the default owner of the component, gtk-bugs@gtk.org.

Comment 1 Havoc Pennington 2001-01-28 05:47:34 UTC
Maybe a function pango_get_approximate_pixels_for_n_chars() or
something that takes a font description.  
Comment 2 Havoc Pennington 2001-01-29 19:39:55 UTC
Put all GTK 1.3.x bugs on 2.0.0 milestone
Comment 3 Havoc Pennington 2001-01-29 19:49:43 UTC
Setting API-affecting bugs to the API freeze milestone
Comment 4 Havoc Pennington 2001-02-16 22:10:39 UTC
Suggested fix here is to add an arg to PangoFontMetrics struct which
returns an approximate average char width of some kind. Could also add
an approximate width for numbers.
Comment 5 Havoc Pennington 2001-02-16 22:48:36 UTC
Also, spinbutton can maybe autoset a good size for the given number range.
Comment 6 Havoc Pennington 2001-02-28 19:25:35 UTC
doing this one
Comment 7 Havoc Pennington 2001-03-07 21:21:55 UTC
spinbutton work remains
Comment 8 Havoc Pennington 2001-03-08 02:02:20 UTC
Checked in spinbutton autosize smarts