GNOME Bugzilla – Bug 123478
folder information text does NOT change size
Last modified: 2004-12-22 21:47:04 UTC
Using a gnome-2.4 build from 29/09/2003. - change the gnome theme to HighContrastLargePrintInverse - increase the application and window fonts size (18 point) - open nautilus See that most text in Nautilus changes to the perscribed size and style. However, the directory information in the sidepane does not change.
This is because, Nautilus sidebar title's title_text and more_info_text font is hardcoded. Removing the hardcoding of font fixes the problem. I have a patch which does this and I will upload that soon. Note: Actually, the two lables are GTK lables. They automatically adjust to the new font set. There is no need to explicitly set the changed font to them. But in the code, the NautilusSideBarTitles's style is got, font_description is read from the style and that font is set to the lables. Is this required ? If not, there is no need of the functions style_set() and update_title_font().
Created attachment 22368 [details] [review] proposed patch to remove font hardcoding.
Code still exists in 2.5. regs, Chris
With this patch the label fontsize won't change in order to make the filename fit in the sidebar though. I'm not sure this is what we want.
Alex: Right, with the patch, the font size won't fit in the sidebar width. There is a bug in the code though. The maximum size of title_text is hard-coded to 18, which should not be the case for a11y. I can provide a new patch which does the following: a) The maximum size of label (folder name) will not be hard-coded, but will be picked from the font the user selects. And also, label size will change to fit inside the sidebar width. b) Change the more_info_text (folder info) font size based on the font user selects. please let know your thoughts.
I will attach a patch with the above approach.
Created attachment 23899 [details] [review] Patch with the proposed approach after review comments.
Alex, Could you please comment on the above approach and patch. Thanks, Narayana
That doesn't look right, It changes the default look, and leaves a bunch of unnecessary leftover code. - pango_font_description_set_size (font_desc, MORE_INFO_FONT_SIZE * PANGO_SCALE); This changes the default look, and makes duplicating the font description totally unnecessary. I've changed it to be a min-size instead. + max_style_font_size = pango_font_description_get_size (title_font) / PANGO_SCALE; + if (max_style_font_size < MIN_TITLE_FONT_SIZE) { + max_style_font_size = MIN_TITLE_FONT_SIZE + 1; + } This changes the default to a much smaller font than what we currently use. I changed it to scale the font by 1.8. + if (largest_fitting_font_size <= max_style_font_size) { + pango_font_description_set_size (title_font, largest_fitting_font_size * PANGO_SCALE); + } else { + pango_font_description_set_size (title_font, max_style_font_size * PANGO_SCALE); + } Why is this necesarry. A larger size should never be returned. I removed this.