diff options
author | Ignacio Rodriguez <ignacio@sugarlabs.org> | 2013-12-09 21:36:30 (GMT) |
---|---|---|
committer | Ignacio Rodriguez <ignacio@sugarlabs.org> | 2013-12-09 21:36:30 (GMT) |
commit | db80b58fa2a33d003a8a061c45484c9908d87cf8 (patch) | |
tree | 21a3947cf060eae725d72b7d24e8d4706b2942cf | |
parent | 389145cb493b37c1b8eb60cefb0d68f7c4ec0a0f (diff) |
Use scale in images & text - Gtk2
-rw-r--r-- | activity.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/activity.py b/activity.py index 3178d51..d8ae5e0 100644 --- a/activity.py +++ b/activity.py @@ -212,8 +212,10 @@ participants, so you cannot join.") self.message.set_single_line_mode(True) img = gtk.Image() - pb = gtk.gdk.pixbuf_new_from_file( - sugar.activity.activity.get_bundle_path() + '/dist.svg') + width = gtk.gdk.screen_width() / 3 + pb = gtk.gdk.pixbuf_new_from_file_at_size( + sugar.activity.activity.get_bundle_path() + '/dist.svg' + width, -1) img.set_from_pixbuf(pb) self.value = gtk.Label() @@ -222,7 +224,8 @@ participants, so you cannot join.") valuefont = pango.FontDescription() valuefont.set_family("monospace") - valuefont.set_absolute_size(300 * pango.SCALE) + size = gtk.gdk.screen_width() / 5 + valuefont.set_absolute_size(size * pango.SCALE) self.value.modify_font(valuefont) self.value.set_single_line_mode(True) |