this is the right way and issue 15277 does not have anything to do with it.
My questions are:
1) what exactly is the problem with the generated code?
none.
2) what would then be the correct way to generate it?
as pointed.
Glamorous (Moose) icons seem to use different format (using byte array instead of Base64), but I do not see any code that would generate those methods.
their fault, not ours :)
and more in deep: there is obviously several ways to do this, and none of them are incorrect. The way provided in ThemeIcons is the way that consumes less space (in sources) I could find… At the end, you have to provide a bitmap, the difference is how to encode them, so is just a different way of encoding the same information.
cheers,
Esteban