diff options
author | Ignacio Rodríguez <ignaciorodriguez@sugarlabs.org> | 2013-05-05 17:29:50 (GMT) |
---|---|---|
committer | Ignacio Rodríguez <ignaciorodriguez@sugarlabs.org> | 2013-05-05 17:29:50 (GMT) |
commit | 19db2077746ca833653929a569c726bcca979682 (patch) | |
tree | b9a0c4b92c9be1c39c8b06704443a7ed50d95437 | |
parent | cf2e98914de9ab879f4bc383afa40d39338bf4c8 (diff) |
Logo de Python Joven
-rw-r--r-- | Widgets.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Widgets.py b/Widgets.py new file mode 100644 index 0000000..59b830e --- /dev/null +++ b/Widgets.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Widgets.py +# Cristian García <cristian99garcia@gmail.com> +# Ignacio Rodríguez <nachoel01@gmail.com> + +from gi.repository import Gtk +from gi.repository import Gdk +from gi.repository import GdkPixbuf +from gi.repository import GObject +from Globales import * + + +def get_pixbuf(path, x=None, y=None): + if x is None or y is None: + pixbuf = GdkPixbuf.Pixbuf.new_from_file(path) + return pixbuf + else: + pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(path, x, y) + return pixbuf + +class LogoJoven(Gtk.Image): + + def __init__(self): + super(LogoJoven, self).__init__() + + self.set_from_pixbuf(get_pixbuf(LOGO_JOVEN)) + self.show_all() + + |