Backport a patch to fix ico quality sorting

This commit is contained in:
Kalev Lember 2017-07-26 20:15:24 +02:00
parent cf3079a8c1
commit 3fd4f1b5b5
2 changed files with 39 additions and 1 deletions

View File

@ -0,0 +1,32 @@
From d6a0233a331a957615ba0dd7fa569fb496e3caf2 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Wed, 26 Jul 2017 15:57:10 +0200
Subject: [PATCH] ico: Fix icon quality sorting
Despite the inherited comment, commit 99508c7 sorted the icons by
increasing instead of decreasing quality.
https://bugzilla.gnome.org/show_bug.cgi?id=785447
---
gdk-pixbuf/io-ico.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdk-pixbuf/io-ico.c b/gdk-pixbuf/io-ico.c
index 12f0a58802..5b3646cb3d 100644
--- a/gdk-pixbuf/io-ico.c
+++ b/gdk-pixbuf/io-ico.c
@@ -203,9 +203,9 @@ compare_direntry_scores (gconstpointer a,
const struct ico_direntry_data *ib = b;
/* Backwards, so largest first */
- if (ib->ImageScore > ia->ImageScore)
+ if (ib->ImageScore < ia->ImageScore)
return -1;
- else if (ib->ImageScore < ia->ImageScore)
+ else if (ib->ImageScore > ia->ImageScore)
return 1;
return 0;
}
--
2.13.0

View File

@ -2,7 +2,7 @@
Name: gdk-pixbuf2
Version: 2.36.7
Release: 3%{?dist}
Release: 4%{?dist}
Summary: An image loading library
License: LGPLv2+
@ -10,6 +10,9 @@ URL: http://www.gtk.org
#VCS: git:git://git.gnome.org/gdk-pixbuf
Source0: http://download.gnome.org/sources/gdk-pixbuf/2.36/gdk-pixbuf-%{version}.tar.xz
# Backported from upstream
Patch0: 0001-ico-Fix-icon-quality-sorting.patch
BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version}
BuildRequires: libpng-devel
BuildRequires: libjpeg-devel
@ -174,6 +177,9 @@ gdk-pixbuf-query-loaders-%{__isa_bits} --update-cache
%changelog
* Wed Jul 26 2017 Kalev Lember <klember@redhat.com> - 2.36.7-4
- Backport a patch to fix ico quality sorting
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.36.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild