[PATCH] Don't show frames around images with an alpha plane



Very small patch that doesn't show a frame around images with an alpha
plane which makes the images look a lot better

It's actually a modification of this patch which I committed a wile ago

commit 2a94803b44010e3c47a9f7b94894fab8d6062abc
Author: Jaap A. Haitsma <jaap haitsma org>
Date:   Sat Jul 18 20:45:05 2009 +0200

    Fix handling of small images/icons

    Small images with an alpha plane don't get a frame
    Use different scaling strategy for small images. Small images/icons
    won't get up scaled in default zoom view. They are shown in their actual
    Fixes bug #585186


Can I commit the attached patch?

Jaap
From bd97abd6133b8400493611052ccb0d0f83b35848 Mon Sep 17 00:00:00 2001
From: Jaap A. Haitsma <jaap haitsma org>
Date: Sat, 5 Sep 2009 12:34:22 +0200
Subject: [PATCH] Don't show frames around images with alpha plane

---
 libnautilus-private/nautilus-file.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c
index cfe5c5b..84d99ac 100644
--- a/libnautilus-private/nautilus-file.c
+++ b/libnautilus-private/nautilus-file.c
@@ -4165,8 +4165,8 @@ nautilus_file_get_icon (NautilusFile *file,
 								 w * scale, h * scale,
 								 GDK_INTERP_BILINEAR);
 
-			/* We don't want frames around small icons */
-			if (!gdk_pixbuf_get_has_alpha(raw_pixbuf) || s >= 128) {
+			/* We don't want frames around images with an alpha plane */
+			if (!gdk_pixbuf_get_has_alpha(raw_pixbuf)) {
 				nautilus_thumbnail_frame_image (&scaled_pixbuf);
 			}
 			g_object_unref (raw_pixbuf);
-- 
1.6.3.3



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]