Bug introduced in V9.0 or earlier and persisting through V11.3
I have a problem with images with alpha channel which I want to use as labels on Button
etc. Unless I scroll or move cursor over the Button
the alpha channel is considered a white background.
Button[
SetAlphaChannel[Graphics@Rectangle[], Graphics@Disk[]],
Print[1]]
Same with a Graphics
in various objects, shown here with the ReverseColor stylesheet:
icon = Graphics[{Green, Disk[]}, ImageSize -> {15, 15}, Background -> None];
{Button[Dynamic@Row@{icon}, {}],
Panel[Dynamic@Row@{icon}],
Pane[Dynamic@Row@{icon}, BaseStyle -> {Background -> White}],
Framed[Dynamic@Row@{icon}, Background -> White]}
For more examples, see Dynamic graphics appears first with wrong background.
How to force the first appearance to be there instantaneously, without moving the mouse over. I'm working on Win7 V10.1. Is there any stable solution to this problem?
Edit 10.09.15
I reported the issue and received a bug confirmation:
[...] Unfortunately, we do not have a work-around for this issue and I apologize for any inconvenience this is causing you. I have forwarded an incident report to our developers with the information you provided. [...]
CacheGraphics->False
. i.e.Button[Style[SetAlphaChannel[Graphics@Rectangle[], Graphics@Disk[]], CacheGraphics -> False], Print[1]]
$\endgroup$