The "checked" texture is the yellow/white border around the icon when the ability is active. The pushed and highlight textures are similar border styles and not the actual icon either.
Hooking directly into the function that sets the icons worked for me.
Lua Code:
hooksecurefunc("StanceBar_UpdateState",function()
for i=1,math.min(NUM_STANCE_SLOTS,GetNumShapeshiftForms()) do
local _,active,_,spellid=GetShapeshiftFormInfo(i);
local icon=StanceBarFrame.StanceButtons[i].icon;
icon:SetTexture(GetSpellTexture(spellid));
icon:SetDesaturated(active);
end
end);
The actionbars on the other hand don't have a clear way to identify if a toggled ability is active. You could compare the action texture with the spell texture and see if they differ, but this causes some false positives for auto-attack type abilities that show the equipped weapon's icon instead of their internal spell texture.