beagle r4543 - trunk/beagle/search/Beagle.Search.Tiles
- From: llipka svn gnome org
- To: svn-commits-list gnome org
- Subject: beagle r4543 - trunk/beagle/search/Beagle.Search.Tiles
- Date: Thu, 28 Feb 2008 00:57:09 +0000 (GMT)
Author: llipka
Date: Thu Feb 28 00:57:09 2008
New Revision: 4543
URL: http://svn.gnome.org/viewvc/beagle?rev=4543&view=rev
Log:
Only display the emblem if the base icon is at least twice its size in one direction.
Modified:
trunk/beagle/search/Beagle.Search.Tiles/File.cs
Modified: trunk/beagle/search/Beagle.Search.Tiles/File.cs
==============================================================================
--- trunk/beagle/search/Beagle.Search.Tiles/File.cs (original)
+++ trunk/beagle/search/Beagle.Search.Tiles/File.cs Thu Feb 28 00:57:09 2008
@@ -63,24 +63,24 @@
if (emblem_pixbuf == null)
return;
- Gdk.Pixbuf icon_pixbuf = image.Pixbuf.Copy ();
+ Gdk.Pixbuf icon = image.Pixbuf.Copy ();
// If the icon itself is smaller than our requested
- // emblem, just display the emblem.
+ // emblem, just display the icon.
- if (icon_pixbuf.Height < emblem_pixbuf.Height || icon_pixbuf.Width < emblem_pixbuf.Width) {
- icon_pixbuf.Dispose ();
- image.Pixbuf.Dispose ();
- image.Pixbuf = emblem_pixbuf;
+ if ((icon.Height < emblem_pixbuf.Height || icon.Width < emblem_pixbuf.Width) ||
+ (icon.Height < (emblem_pixbuf.Height * 2) && icon.Width < (emblem_pixbuf.Width * 2))) {
+ icon.Dispose ();
+ emblem_pixbuf.Dispose ();
return;
}
- emblem_pixbuf.Composite (icon_pixbuf, 0, 0, emblem_pixbuf.Width, emblem_pixbuf.Height,
+ emblem_pixbuf.Composite (icon, 0, 0, emblem_pixbuf.Width, emblem_pixbuf.Height,
0, 0, 1, 1, Gdk.InterpType.Bilinear, 255);
emblem_pixbuf.Dispose ();
image.Pixbuf.Dispose ();
- image.Pixbuf = icon_pixbuf;
+ image.Pixbuf = icon;
}
protected static string GetTitle (Beagle.Hit hit, bool get_parent)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]