Re: desktop font + PATCH for 82565
- From: David Watson <dwatson cs ucr edu>
- To: Frank Worsley <fworsley shaw ca>
- Cc: Dave Bordoley <bordoley msu edu>, Alex Larsson <alexl redhat com>, Chris Heywood <psych28 dingoblue net au>, <nautilus-list gnome org>
- Subject: Re: desktop font + PATCH for 82565
- Date: Wed, 29 May 2002 22:30:07 -0700 (PDT)
Great work Frank!
You'll need to wait for Alex before commiting but here are a few things I
noticed...
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/nautilus/ChangeLog,v
retrieving revision 1.5338
diff -u -p -r1.5338 ChangeLog
--- ChangeLog 2002/05/29 16:49:32 1.5338
+++ ChangeLog 2002/05/30 02:48:55
@@ -1,3 +1,11 @@
+2002-05-29 Frank Worsley <fworsley shaw ca>
+
+ * src/file-manager/fm-icon-view.c:
+ * src/file-manager/fm-list-view.c:
+ always use user selected font at the default zoom level
+ that way if you run at a lower/higher default zoom you still
+ keep your selected font and don't have a tiny/large font
+
2002-05-29 Michael Meeks <michael ximian com>
* libnautilus-private/nautilus-file.c
Index: src/file-manager/fm-icon-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-icon-view.c,v
retrieving revision 1.261
diff -u -p -r1.261 fm-icon-view.c
--- src/file-manager/fm-icon-view.c 2002/05/21 18:24:19 1.261
+++ src/file-manager/fm-icon-view.c 2002/05/30 02:49:10
@@ -959,6 +959,99 @@ fm_icon_view_end_loading (FMDirectoryVie
icon_view->details->loading = FALSE;
}
+static void
+fm_icon_view_update_font_size_table (FMIconView *view)
+{
+ NautilusIconContainer *container;
+ int font_size_table[NAUTILUS_ZOOM_LEVEL_LARGEST + 1];
+ int default_zoom;
+
+ container = get_icon_container (view);
+ g_assert (container != NULL);
+
+ default_zoom = eel_preferences_get_enum (
+ NAUTILUS_PREFERENCES_ICON_VIEW_DEFAULT_ZOOM_LEVEL);
You should use get_default_zoom_level instead of eel_preferences_get_enum
(actually, if the auto value were setup like it is in the list view then
you could remove get_default_zoom_level altogether and just use
default_zoom_level_auto_value directly)
static void fm_list_view_set_zoom_level (FMListView *view,
NautilusZoomLevel new_level,
- gboolean always_set_level);
+ gboolean always_set_level,
+ gboolean update_size_table);
It seems like a bad idea to add another argument here; how is the caller
supposed to know if the font table should be updated? I think it would be
better if you compared new_level with view->details->zoom_level and if
they're not equal then update the font table.
+ case NAUTILUS_ZOOM_LEVEL_SMALLEST:
+ pango_scale[0] = PANGO_SCALE_MEDIUM;
+ pango_scale[1] = PANGO_SCALE_LARGE;
+ pango_scale[2] = PANGO_SCALE_X_LARGE;
+ pango_scale[3] = PANGO_SCALE_XX_LARGE;
+ pango_scale[4] = 1.2 * PANGO_SCALE_XX_LARGE;
+ pango_scale[5] = 1.4 * PANGO_SCALE_XX_LARGE;
This doesn't really matter much since all we care about is how it looks
but FYI each PANGO_SCALE is different by a factor of 1.2 (e.g.
PANGO_SCALE_XXXX_LARGE = 1.2 * 1.2 * PANGO_SCALE_XX_LARGE and
PANGO_SCALE_XXX_SMALL = (1 / 1.2) * PANGO_SCALE_XX_SMALL)
+ pango_scale[6] = 1.6 * PANGO_SCALE_XX_LARGE;
+ break;
@@ -575,6 +680,15 @@ fm_list_view_set_zoom_level (FMListView
if (always_set_level) {
fm_directory_view_set_zoom_level (FM_DIRECTORY_VIEW(view), new_level);
}
+ if (update_size_table) {
+ fm_list_view_scale_font_size (view, new_level, update_size_table);
+
+ /* FIXME - if we don't queue a draw here the list view
+ * wont update the font sizes until the user moves the
+ * mouse over a row.
+ */
+ gtk_widget_queue_draw (GTK_WIDGET (view));
Nice Frank! I've been looking for this function (it is also needed in
when we change to single click activation mode).
Other than those few minor points, the patch looks good to me.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]