I can confirm this bug. It occurs both when running Thunar under Xfce as well as under Mate.
In all other applications running under Xfce, the icons are displayed sharp. Thunar will also display blurred icons when using a SVG based icon theme.
Interestingly, with Thunar handling the Desktop under Xfce, the background image is somewhat blurred as well, no matter what settings are used to scale it. This does not happen with Mate DE, where Caja handles the Desktop. Here, the same background image is displayed sharp.
Ubuntu 20.04, Xfce 4.16, Thunar 4.16.2 (Xfce 4.16), 4K-Display (3840x2160), Xfce window scaling set to 2x
Do we have an idea what the technical problem is here? Where do we need to change code? For example is it only a Gtk API thing and we have to change the Gtk API calls? This does not only affect not only Thunar but also the Xfce Panel and Xfdesktop and possibly more programs. Interestingly the Whisker menu doesn't have this problem. All icons are very sharp. So maybe we should compare the Gtk API calls?
P.S.: For someone intereseted, this info may or may not be useful: ExoTreeView is an extension of GtkTreeView but ExoIconView is not an extension of GtkIconView. ExoIconView has its own icon renderer.
Hammering only ThunarIconFactory does not fix the issue. It loads scaled-up icon but somehow those Gtk*View gets scaled-down version and it scales up again?
Though I have to say, for me it seems to have a rather negative effect.
Patch aplied on the left, unpatched on the right. Started with GDK_SCALE=2 GDK_DPI_SCALE=2 thunar:
The toolbar for me looks good in both cases, though the shortcut-side-pane looks rather bad now. @MShrimp4 possibly I miss something for the scaling to properly test ? Do I maybe need a hidpi screen for testing ?
I have a 4K screen and window scaling of 2x enabled. I cannot see any improvement with this patch. Here is a screenshot for comparison. The left Thunar window is without patch and the right one has the patch applied:
Thanks for testing @dc_coder_84 ! Since the patch seems not to work, and actually nobody is working on the issue, I'll remove the 4.18 milestone to dont block the release.
I think doing icon_size * scale_factor can cause problems when certain icons look different at different sizes. So for the sidebar most themes will have the Desktop look like a picture of an actual desktop at 16px and 24px, and look like a folder at 32px and above (same with Pictures, Videos, etc). So doing 16*2 will give the 32px icon for the sidebar when you really want the 16px scaled up if available.