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 123478 - folder information text does NOT change size
folder information text does NOT change size
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: [obsolete] Sidebar
2.5.x
Other All
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
AP2
Depends on:
Blocks:
 
 
Reported: 2003-09-29 15:18 UTC by Patrick Wade
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch to remove font hardcoding. (2.05 KB, patch)
2003-12-12 14:03 UTC, Narayana Pattipati
none Details | Review
Patch with the proposed approach after review comments. (2.54 KB, patch)
2004-01-30 14:16 UTC, Narayana Pattipati
none Details | Review

Description Patrick Wade 2003-09-29 15:18:30 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.
Comment 1 Narayana Pattipati 2003-12-12 14:01:33 UTC
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().
Comment 2 Narayana Pattipati 2003-12-12 14:03:10 UTC
Created attachment 22368 [details] [review]
proposed patch to remove font hardcoding.
Comment 3 Christian Neumair 2004-01-07 18:49:34 UTC
Code still exists in 2.5.

regs,
 Chris
Comment 4 Alexander Larsson 2004-01-19 10:31:08 UTC
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.
Comment 5 Narayana Pattipati 2004-01-20 12:24:05 UTC
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.
Comment 6 Narayana Pattipati 2004-01-30 14:15:32 UTC
I will attach a patch with the above approach.
Comment 7 Narayana Pattipati 2004-01-30 14:16:29 UTC
Created attachment 23899 [details] [review]
Patch with the proposed approach after review comments.
Comment 8 Narayana Pattipati 2004-02-16 04:49:54 UTC
Alex, 

Could you please comment on the above approach and patch.

Thanks,
Narayana
Comment 9 Alexander Larsson 2004-03-01 10:31:25 UTC
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.