Tweaked lens effect
authorEnrico Zini <enrico@enricozini.org>
Mon, 14 Dec 2009 18:54:53 +0000 (18:54 +0000)
committerEnrico Zini <enrico@enricozini.org>
Mon, 14 Dec 2009 18:54:53 +0000 (18:54 +0000)
gtkfisheyelist/gtkfisheyelistview.vala

index 4918269893e022b871e0cc0e1aa6d51d7b6b214a..cc74c7a17b8f98b2903bd73f88678fefde5be219 100644 (file)
@@ -74,7 +74,7 @@ public class FisheyeListView : Gtk.DrawingArea
        protected Gdk.Pixmap backing_store;
 
        // Renderers used at different sizes
-       protected const int steps = 5;
+       protected const int steps = 7;
        protected Gtk.CellRendererText[] renderers;
        protected int[] renderer_sizes;
        protected int max_renderer_size;
@@ -394,7 +394,7 @@ public class FisheyeListView : Gtk.DrawingArea
                        for (int i = 1; i < renderers.length-1; ++i)
                        {
                                renderers[i] = make_cell_renderer();
-                               renderers[i].scale = (double)i / renderers.length;
+                               renderers[i].scale = Math.sqrt((double)i / renderers.length);
                                renderers[i].set_fixed_height_from_font(1);
                                int size;
                                renderers[i].get_size(this, null, null, null, null, out size);