GNOME Bugzilla – Bug 101859
Gtk units need to be based on font size
Last modified: 2015-03-08 14:51:18 UTC
Currently, gtk measurements are specified in pixels. Particularly now that we're being accessibility-friendly, people often want to change their font sizes without adversely affecting the layout of their windows. The only surefire way to do this is to base all measurements on some metric of the current system font (typically the width of the letter 'm' at some standard point size) at the current resolution, rather than using pixel-based measurement. Windoze does this with its Dialog Units (DLUs), not sure what the Mac does. This is obviously a Big Job :)
I think I can confidently punt this off all near-future milestones, even though Owen may be on vacation already. ;-)
Updating status_whiteboard field to reflect A11Y team's assessment of accessibility impact.
See http://mail.gnome.org/archives/gtk-devel-list/2003-February/msg00009.html for a concrete proposal
Apologies for spam... marking as GNOMEVER2.3 so it appears on the official GNOME bug list :)
*** Bug 125158 has been marked as a duplicate of this bug. ***
"Bug 125158" is a duplicate, but proposes another solution for that issue. Instead of specifying concrete sizes in metric units I think this should be a question of the used theme engine. It would be better to provide the application programmer with a predefined set of styles for a given widget. That way the theme engine developer could set the padding/margin/... values according to the given style of the widget.
Apologies for spam-- ensuring Sun a11y team are cc'ed on all current a11y bugs. Filter on "SUN A11Y SPAM" to ignore.
Apologies for spam... ensuring Sun a11y folks are cc'ed on all current accessibility bugs.
This could be considered two different, but related, issues with slightly different solutions IMHO. The first one is to set the default size of GtkWindow and the default position of GtkPaned. (Setting the size of most other things makes little sense since GTK is very good at this on it's own). In this case I think Calum Bensons solution is adequate. An alternative approach could be to set sizes in points and calculate the pixel size from DPI and a global size modifier (which defaults to 1 and need not to be changed in most cases) which could also be used to set default font sizes. The other case is the size of paddings and spacings (as described in "Bug 125158"). The Gnome HIG partially solves this issue by saying that spacings should always be any multiplier of 6 (section 8.2.3). Most developers interpret this as 6 or 12, but some (with very large screens I guess) as 24 or more. The best size of spacings is depending on the monitor size and, perhaps more importantly, the users personal taste. So I think the best solution would be to only let the developer decide if there should be a spacing or not and let the theme decide the size of the spacing. Since the Gnome HIG suggests that some spacings should be differ in cases GTK might not be able distingish by itself it might be a good idea to let developers have a set of spacings to choose from, like for example: GTK_SPACING_NONE = 0 GTK_SPACING_WIDGETS = -1 GTK_SPACING_GROUP_SEPARATOR = -2 GTK_SPACING_ICON_LABEL = -3 GTK_SPACING_DIALOG_BORDER = -4 (The last one, on the other hand, would be really easy for GTK to figure out by itself.)
It seems clear by now that we're going in a different direction