From d891133552c7697d6c96d00057ab53e9d579a4e8 Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Thu, 30 Aug 2007 17:16:09 +0000 Subject: Visual design for shared links Fix for #2919 --- diff --git a/icons/buddy-link.svg b/icons/buddy-link.svg deleted file mode 100644 index 7e79838..0000000 --- a/icons/buddy-link.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - -]> - - - - - - - - - - diff --git a/icons/link.svg b/icons/link.svg new file mode 100644 index 0000000..230f1d1 --- /dev/null +++ b/icons/link.svg @@ -0,0 +1,12 @@ + + + + + +]> + + + + diff --git a/linkbutton.py b/linkbutton.py index 2b628bb..5d6fb65 100644 --- a/linkbutton.py +++ b/linkbutton.py @@ -40,26 +40,26 @@ class LinkButton(gtk.RadioToolButton): pixbuf = loader.get_pixbuf() del loader - xo_buddy = os.path.join(os.path.dirname(__file__), "icons/buddy-link.svg") - pixbuf_xo = self._read_xo_icon(xo_buddy, fill, stroke) - - width = pixbuf_xo.get_width() - height = pixbuf_xo.get_height() - - dest_x = style.zoom(105) - dest_y = style.zoom(65) - w = width*0.7 - h = height*0.7 - scale_x = 0.7 - scale_y = 0.7 + xo_buddy = os.path.join(os.path.dirname(__file__), "icons/link.svg") + pixbuf_bg = self._read_link_background(xo_buddy, fill, stroke) + pixbuf_bg = pixbuf_bg.scale_simple(style.zoom(120), + style.zoom(110), + gtk.gdk.INTERP_BILINEAR) + dest_x = style.zoom(10) + dest_y = style.zoom(20) + w = pixbuf.get_width() + h = pixbuf.get_height() + scale_x = 1 + scale_y = 1 - pixbuf_xo.composite(pixbuf, dest_x, dest_y, w, h, dest_x, dest_y, scale_x, scale_y, gtk.gdk.INTERP_BILINEAR, 255) + pixbuf.composite(pixbuf_bg, dest_x, dest_y, w, h, dest_x, dest_y, + scale_x, scale_y, gtk.gdk.INTERP_BILINEAR, 255) - img.set_from_pixbuf(pixbuf) + img.set_from_pixbuf(pixbuf_bg) self.set_icon_widget(img) img.show() - def _read_xo_icon(self, filename, fill_color, stroke_color): + def _read_link_background(self, filename, fill_color, stroke_color): icon_file = open(filename, 'r') data = icon_file.read() icon_file.close() diff --git a/webactivity.py b/webactivity.py index 90a7726..d76967d 100755 --- a/webactivity.py +++ b/webactivity.py @@ -366,8 +366,8 @@ class WebActivity(activity.Activity): screenshot.get_from_drawable(window, window.get_colormap(), 0, 0, 0, 0, width, height) - screenshot = screenshot.scale_simple(style.zoom(160), - style.zoom(120), + screenshot = screenshot.scale_simple(style.zoom(100), + style.zoom(80), gtk.gdk.INTERP_BILINEAR) buffer = self.get_buffer(screenshot) -- cgit v0.9.1