2013/6/24 Andrew Potter <agpot...@gmail.com>:
> # Note here that the minimum request is set to the natural height of
> the input pixbuf
> # This may not be the desired behavior in all circumstances
>     def do_get_preferred_height_for_width(self, width):
>         return (self.pb.get_height(), width / self.get_aspect_ratio())

Actually, it occurs to me that Kip is almost certainly going to want
to change the size request methods to:
     def do_get_preferred_width(self):
        pw = self.pb.get_width()
        return (0, pw)

    def do_get_preferred_height(self):
        ph = self.pb.get_height()
        return (0, ph)

    def do_get_preferred_height_for_width(self, width):
        ph = width / self.get_aspect_ratio()
        return (ph, ph)

Otherwise it won't scale down properly.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to