Skip to content

Conversation

@jcupitt
Copy link
Member

@jcupitt jcupitt commented Aug 1, 2025

This kind-of works, you do get better icons, however:

  • the fullscreen icon (top right of right-click menu) is still a placeholder (should be a pair of arrows pointing in opposite directions), despite the correct SVG being copied into the correct place in the build

  • icons are not rendered with desktop scaling changes, so they get fuzzy at eg. 225% (this works correctly on my ubuntu fwiw)

  • it'd be good to attach the vipsdisp icon to the generated exe as well, I suppose we need an ICO version of the PNG

This kind-of works, you do get better icons, however:

- the fullscreen icon (top right of right-click menu) is still a
  placeholder (should be a pair of arrows pointing in opposite
  directions), despite the correct SVG being copied into the correct
  place in the build

- icons are not rendered with desktop scaling changes, so they get fuzzy
  at eg. 225% (this works correctly on my ubuntu fwiw)

- it'd be good to attach the vipsdisp icon to the generated exe as well,
  I suppose we need an ICO version of the PNG
@jcupitt
Copy link
Member Author

jcupitt commented Aug 1, 2025

Eg. at 225% on win10 I see:

image

The difference in sharpness between the icons and the text is jarring.

@jcupitt
Copy link
Member Author

jcupitt commented Aug 1, 2025

Ah here's a better comparison ... ubuntu at 300%:

image

win10 at 200%:

image

@jcupitt jcupitt marked this pull request as draft August 1, 2025 13:42
@jcupitt
Copy link
Member Author

jcupitt commented Aug 2, 2025

vipsdisp now has a program icon at least:

image

@kleisauke
Copy link
Member

Great! Commit 6a7bbca updates adwaita-icon-theme to 48.1, but the icons still appear blurry at 200% scale. I'm not sure why that's happening (perhaps it uses PNG images rather than SVG?).

@kleisauke
Copy link
Member

Ah, the fullscreen icon is still a placeholder. Weird.

@jcupitt
Copy link
Member Author

jcupitt commented Aug 2, 2025

Maybe the gtk SVG loader isn't enabled for some reason? I'll see if I can test it somehow.

@kleisauke
Copy link
Member

Here are the debug logs:

Details
$ set GTK_DEBUG=icontheme,iconfallback
$ set G_WIN32_ATTACH_CONSOLE=stdout,stderr
$ vipsdisp
look for icon cache in C:\Users\kleisauke\vipsdisp-x86_64-4.1.1-windows-icon\share\icons\Adwaita
icon cache outdated
...
Current icon themes Adwaita hicolor
754 strings, 5 chunks
...
org.libvips.vipsdisp
...
view-fullscreen-symbolic
...
looking up icon view-fullscreen-symbolic for scale 2
        lookup name: view-fullscreen-symbolic-ltr
        lookup name: view-fullscreen-symbolic
        lookup name: view-fullscreen-ltr
        lookup name: view-fullscreen
No icon found in Adwaita (or fallbacks) for: view-fullscreen-symbolic-ltr, view-fullscreen-symbolic, view-fullscreen-ltr, view-fullscreen
        lookup name: image-missing

It looks like it doesn't want to use the scalable variant of view-fullscreen-symbolic. Also, the "icon cache outdated" warning is a bit unusual.

@kleisauke
Copy link
Member

Ah, I think I know what's wrong. librsvg only became a dependency of GTK starting with v4.19.2 (GNOME/gtk@939bf25). In earlier versions, it's likely using the librsvg loader via GDK-PixBuf, which isn't built.

-Dpixbuf-loader=disabled \

@jcupitt
Copy link
Member Author

jcupitt commented Aug 2, 2025

Ah, I wondered if it was something like that. I just made a test vipsdisp which adds a SVG backdrop to imagewindow:

https://github.com/jcupitt/vipsdisp/releases/tag/v4.1.1-test-gtk-svg-load

@jcupitt
Copy link
Member Author

jcupitt commented Aug 2, 2025

For the icon cache warning, I think when we copy share/icons/Adwaita into the target directory, the timestamp on the root directory and cache has to be newer than any icons in that subtree. So probably we just need to touch every file in share/icons/*/* after the copy.

(though I think the warning is probably harmless)

@jcupitt
Copy link
Member Author

jcupitt commented Aug 2, 2025

Yes, adding the touch fixes the icon cache warning. I now see:

jcupi@DESKTOP-HGI6HBR MINGW64 /f/vipsdisp-x86_64-4.1.1-test-gtk-svg-load/bin
$ export GTK_DEBUG=icontheme,iconfallback

jcupi@DESKTOP-HGI6HBR MINGW64 /f/vipsdisp-x86_64-4.1.1-test-gtk-svg-load/bin
$ export G_WIN32_ATTACH_CONSOLE=stdout,stderr

jcupi@DESKTOP-HGI6HBR MINGW64 /f/vipsdisp-x86_64-4.1.1-test-gtk-svg-load/bin
$ ./vipsdisp.exe
754 strings, 5 chunks
preferences-other-symbolic
media-seek-backward-symbolic
...

The SVG backdrop fails to render though, so as you say I think pixbuf is missing that loader.

@jcupitt
Copy link
Member Author

jcupitt commented Aug 2, 2025

librsvg fails to build with pixbuf-loader enabled:

752.8    Compiling pixbufloader-svg v0.0.1 (/var/tmp/tmp-librsvg-x86_64-w64-mingw32.shared.all/librsvg-2.60.0/gdk-pixbuf-loader)
752.8 error: failed to run custom build command for `pixbufloader-svg v0.0.1 (/var/tmp/tmp-librsvg-x86_64-w64-mingw32.shared.all/librsvg-2.60.0/gdk-pixbuf-loader)`
...
752.8   pkg-config exited with status code 1
752.8   > PKG_CONFIG_PATH=/var/tmp/tmp-librsvg-x86_64-w64-mingw32.shared.all/librsvg-2.60.0.build_/meson-uninstalled PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 /usr/local/mxe/usr/bin/x86_64-w64-mingw32.shared.all-pkg-config --libs --cflags librsvg-2.0-uninstalled librsvg-2.0-uninstalled >= 2.57
752.8   The system library `librsvg-2.0-uninstalled` required by crate `pixbufloader-svg` was not found.

It looks like we need to patch pkg-config:

yoctoproject/poky@c7e8807

I'll have a go.

@kleisauke
Copy link
Member

Commit 4a04adc should fix this. Phew!

@jcupitt
Copy link
Member Author

jcupitt commented Aug 2, 2025

Oh haha you beat me! I was trying to update gtk4 to 4.19.2 instead. I'll try your patch!

@kleisauke
Copy link
Member

Commit f35126c in PR #77 did update GTK to 4.19.2, but I reverted that due to https://gitlab.gnome.org/GNOME/gtk/-/issues/7567. I'll give it another shot once that's sorted out.

Anyway, I forgot to upload a screenshot:
screenshot

@jcupitt
Copy link
Member Author

jcupitt commented Aug 2, 2025

That looks great! Except for the stupid lion in the background.

@jcupitt jcupitt marked this pull request as ready for review August 2, 2025 15:11
@jcupitt
Copy link
Member Author

jcupitt commented Aug 2, 2025

I made a vipsdisp 4.1.2 release with the icon stuff in, it all works very well now! Thank you for fixing it!

https://github.com/jcupitt/vipsdisp/releases/tag/v4.1.2

I promise not to touch any of this again for many weeks.

Copy link
Member

@kleisauke kleisauke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! The MSI installer is the only thing left on my GTK TODO list now. :)

@kleisauke kleisauke merged commit 37deceb into master Aug 3, 2025
@jcupitt
Copy link
Member Author

jcupitt commented Aug 3, 2025

The MSI installer is the only thing left on my GTK TODO list now. :)

Haha! Good luck with that.

@kleisauke kleisauke mentioned this pull request Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants