fdicons: Fix threshold distance v1 PROPOSED

Tom Lebreux
Tom Lebreux: 1
 Fix threshold distance

 1 files changed, 1 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/public-inbox/patches/9826/mbox | git am -3
Learn more about email & git

[PATCH fdicons] Fix threshold distance Export this patch

Tom Lebreux
The algorithm here still does not match the one from the icon theme 
specification. In the specification, the compares iconsize*iconsize, not
iconsize*iconscale. I think that's a typo in the specification, but I'm not sure
about it.

In the meanwhile I'm contacting alexl@redhat.com (from the specification page)
to confirm whether or not that's a typo..
 src/lookup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lookup.c b/src/lookup.c
index b09f66baeb5c..ee48b2fc85f1 100644
--- a/src/lookup.c
+++ b/src/lookup.c
@@ -75,7 +75,7 @@ fd_icon_theme_dir_size_distance(
		if (size < (dir->size-dir->threshold) * dir->scale) {
			return min_size * dir->scale - size;
		if (size > (dir->size-dir->threshold) * dir->scale) {
		if (size > (dir->size+dir->threshold) * dir->scale) {
			return size - max_size * dir->scale;
		return INT_MAX;
View this thread in the archives