Re: Invisible GtkImage
- From: Andrew Potter <agpotter gmail com>
- To: GTK Devel List <gtk-app-devel-list gnome org>
- Subject: Re: Invisible GtkImage
- Date: Mon, 24 Jun 2013 13:56:54 -0700
2013/6/24 Andrew Potter <agpotter 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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]