GNOME Bugzilla – Bug 6152
entry/text widgets should let you set size in chars
Last modified: 2011-02-04 16:09:25 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.
Maybe a function pango_get_approximate_pixels_for_n_chars() or something that takes a font description.
Put all GTK 1.3.x bugs on 2.0.0 milestone
Setting API-affecting bugs to the API freeze milestone
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.
Also, spinbutton can maybe autoset a good size for the given number range.
doing this one
spinbutton work remains
Checked in spinbutton autosize smarts