[Xfce4-commits] [apps/xfdashboard] 03/05: Fix loading scalable images by icon name

noreply at xfce.org noreply at xfce.org
Tue Mar 24 10:25:15 CET 2015


This is an automated email from the git hooks/post-receive script.

nomad pushed a commit to annotated tag 0.2.2
in repository apps/xfdashboard.

commit 09fd9885e0d285f2538514ef89272e87a3a0bfc9
Author: Stephan Haller <nomad at froevel.de>
Date:   Tue Aug 5 21:04:55 2014 +0200

    Fix loading scalable images by icon name
    
    Load images by icon name with scaling at requested size. If file to load is a bitmap it should already be at right size but if is scalable image (svg) is was loaded as a too small bitmap and then scaled resulting in an ugly image but now should look good and "right-scaled".
    
    Conflicts:
    	data/themes/xfdashboard/xfdashboard.css
---
 data/themes/xfdashboard/xfdashboard.css |   16 ++++++++++++++++
 src/image-content.c                     |   11 +++++++----
 2 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/data/themes/xfdashboard/xfdashboard.css b/data/themes/xfdashboard/xfdashboard.css
index 6c4d47c..afcc200 100644
--- a/data/themes/xfdashboard/xfdashboard.css
+++ b/data/themes/xfdashboard/xfdashboard.css
@@ -1,3 +1,19 @@
+<<<<<<< HEAD
+=======
+ at constants
+{
+	background: @rgba(87, 146, 226, 0.38) /*#5792e260*/;
+	overlay-background: @alpha(@background, 1.0) /*#5792e2ff*/ ;
+	overlay-outline: #4681d1ff;
+	missing-icon: @try_icons("image-missing", "gtk-missing-image");
+	close-icon: @try_icons("window-close-symbolic", "window-close", "gtk-close", @missing-icon);
+	search-icon: @try_icons("edit-find-symbolic", "edit-find", "gtk-find", @missing-icon);
+	home-icon: @try_icons("go-home-symbolic", "gtk-home", @missing-icon);
+	trash-icon: @try_icons("user-trash", "gtk-delete", @missing-icon);
+	clear-icon: @try_icons("edit-clear-symbolic", "edit-clear", "gtk-clear", @missing-icon);
+}
+
+>>>>>>> e74c0bc... Fix loading scalable images by icon name
 /* Stage */
 XfdashboardStage
 {
diff --git a/src/image-content.c b/src/image-content.c
index 191bf5b..c8c7fa7 100644
--- a/src/image-content.c
+++ b/src/image-content.c
@@ -662,10 +662,13 @@ static void _xfdashboard_image_content_load_from_icon_name(XfdashboardImageConte
 			 * the callback function we take an extra reference on this
 			 * instance. It will be release in callback function.
 			 */
-			gdk_pixbuf_new_from_stream_async(stream,
-												NULL,
-												(GAsyncReadyCallback)_xfdashboard_image_content_loading_async_callback,
-												g_object_ref(self));
+			gdk_pixbuf_new_from_stream_at_scale_async(stream,
+														priv->iconSize,
+														priv->iconSize,
+														TRUE,
+														NULL,
+														(GAsyncReadyCallback)_xfdashboard_image_content_loading_async_callback,
+														g_object_ref(self));
 
 			/* Release allocated resources */
 			g_object_unref(stream);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list