Try to fit the descent in, in a hackish way
authorEnrico Zini <enrico@enricozini.org>
Tue, 8 Dec 2009 21:00:35 +0000 (21:00 +0000)
committerEnrico Zini <enrico@enricozini.org>
Tue, 8 Dec 2009 21:00:35 +0000 (21:00 +0000)
src/fisheye.vala

index caa124096291b814ffdd273d3d7496c5c0dad0a8..2eb6bd4f7166f10245c0377eca8b3f12764d6ad5 100644 (file)
@@ -42,7 +42,7 @@ public class FisheyeList : Gtk.DrawingArea
 
                list = new string[300];
                for (int i = 0; i < 300; ++i)
-                       list[i] = "Antani %d".printf(i);
+                       list[i] = "Lorem Ipsum %d".printf(i);
 
                cur_el = 0;
                focus_centre = 0;
@@ -212,7 +212,7 @@ public class FisheyeList : Gtk.DrawingArea
 
                        var fd = style.font_desc.copy();
                        //fd.set_size((y1-y0)*Pango.SCALE);
-                       fd.set_absolute_size((y1-y0)*Pango.SCALE);
+                       fd.set_absolute_size((y1-y0)*Pango.SCALE*80/100);
                        layout.set_font_description(fd);
                        //stderr.printf("AZAZA %p\n", layout.get_attributes());
                        //var attrlist = layout.get_attributes().copy();
@@ -224,6 +224,8 @@ public class FisheyeList : Gtk.DrawingArea
                        //attrlist.change(new Pango.AttrSize(y1-y0));
                        //layout.set_attributes(attrlist);
                        //layout.set_height(y1-y0);
+                       //int w, h;
+                       //layout.get_pixel_size(out w, out h);
                        Gdk.draw_layout(drawable, style.fg_gc[itemState], 0, y0, layout);
                }
        }