GTK hack to draw the background of desktop item names more like the original
Currently, the background of desktop item names are drawn with a lot of extra padding.
However, using the background-image property with a single color -gtk-gradient, we can reposition & resize the background to trim off some of this padding & make the rendering appear closer to the original.
This is untested on high-DPI, so if anyone has a high-DPI system to test this with, please let me know how it goes.
Thank you for your time!
@EMH-Mark-I have you had a chance to take a look? I'm happy to accept this change.
Tried without composition, no weird black borders or something. Though I would raise the padding by one pixel on all sides, I think that might just get a liiiittle closer to the original.
I just wanted to check in with a note for the future (for when XFCE makes the move to GTK4): -gtk-gradient has been replaced with linear-gradient in GTK4.
I played around with the GTK interactive debugger attached to gtk4-demo-application, and I can verify that the underlying hack (using gradients to create a resizable background rect) still works in GTK4 with linear-gradient, so when the time for GTK4 rolls around, all that needs to be done here is replacing -gtk-gradient with linear-gradient.
(BTW @Fierelier: I'll try to take a look at improving the appearance & accuracy sometime later on today, thank you for your feedback!)