GNOME Bugzilla – Bug 749559
W32: Shadow style mismatch
Last modified: 2015-05-19 14:11:47 UTC
W32 WM draws a special kind of shadow for any cursor (except for inverse-cursors) automatically (when appropriate setting is enabled). It has no gradient (is uniformly gray, albeit blurry at the edges), unlike Adwaita shadows (which are thick next to cursor and quickly thin out with distance), and it's gray instead of black. This makes Adwaita look very out of place when it's used alongside the normal W32 cursor theme (i.e. when GTK has cursor theme set to "system", which is going to be the default). The solution for that is to render cursors without shadows and then generate W32-lookalike shadows for the PNGs before (or while) feeding them to anicursorgen. Note that we can't use W32 WM to draw shadows because W32 WM only does that for system cursors, and cursors set by GTK via SetCursor() are not system cursors.
Created attachment 303552 [details] [review] Add shadow generation and a make-script for W32 cursors * anicursorgen.py now can generate shadows similar to those that W32 WM generates for system cursors. This is enabled by the -s option and disabled (overriding previous -s occurrences) by the -n option. Options -r, -d, -b and -c are available to customize the shadow generator. This will generate shadows even for parts of cursors that normally have no shadows in Adwaita (the sub-icons attached to dnd and left_ptr variants). However, this is consistent with how W32 WM draws shadows (i.e. IDC_HELP). * New make-w32.sh, which is just like make.sh, except that it generates W32 cursors. Any arguments given to make-w32.sh will be passed along to anicursorgen.py that it runs. It knows enough to pass an extra -n when generating a 'tcross' cursor.
Thus the version of Adwaita installed for GTK would have W32-ish shadows built into cursors (make-w32.sh should be called with -s), while the version of Adwaita intended for being used as a W32 system cursor theme would have no shadows (make-w32.sh should be called without -s).
Attachment 303552 [details] pushed as feb88a1 - Add shadow generation and a make-script for W32 cursors