Hi,
I was under the impression that I can change the "Icon" for the
"Mainwindow". I an using a ".XPM" image with a "transparent" color for
background. When the window is displayed I get black background instead of
transparent one. I have tested this with ".PNG". ".JPG" and ".GIF", they all
exhibit the same behavior. Any help is appreciated din advance.
here is my code (transparent color -s "l" which is set to "None":
===================
my $winicon = <<'end-of-x11-pixmap-data';
/* XPM */
static const char *appleOrange_xpm[] = {
/* width height num_colors chars_per_pixel */
" 32 32 32 1",
/* colors */
"` c #1d1a0b",
". c #19901d",
"# c #b09125",
"a c #a2d65b",
"b c #afe499",
"c c #a52710",
"d c #e0cd25",
"e c #a54f24",
"f c #fbe847",
"g c #edd8dc",
"h c #fcf0a1",
"i c #f5945f",
"j c #284e1e",
"k c #f9d32c",
"l c None",
"m c #e34e1e",
"n c #da1104",
"o c #53cf47",
"p c #5f4b21",
"q c #610c05",
"r c #579d2c",
"s c #e9b334",
"t c #ed6f3e",
"u c #b9ae37",
"v c #71f561",
"w c #97730e",
"x c #246d12",
"y c #95f373",
"z c #54721d",
"A c #24b02a",
"B c #ea340a",
"C c #652f0f",
/* pixels */
"lllllp````llllllllllllllblllllll",
"llllgl```xbbllllglgllllllllglgll",
"gglgglgC```lllglllllllglllllllll",
"llllglgqC`qlgh`glllllgllllglllll",
"bllgqcqccqqccCqcpClgllgglggllllb",
"llgCecBBccqqcmctpppjlllglgwjjxxj",
"lheCmcmcBBqBBcmce#bxrall`zzabbrj",
"lCqettttBnmnBBBBwwabrxlxzaayyar`",
"qqetiiiitmBBBBBBe#uyoxx.oovyvyzh",
"qctigiiiimmBBBBBc#aao..Avoovorjl",
"cBtiigiiitBBBBBBewzro...oAvyor`l",
"nctiiiiiitmBBBBBewzrr.AAAvArrjll",
"cntiiiiitmBBBBBm#uu#zxxAArxz`lll",
"ccmtiiittmBBBmttsfhdrzxrruud`lll",
"cBmmtttmBBBBmmidffffhfddaffsuCll",
"cccemBBBBBBBmtdfffhffkfffkkksi`l",
"gqemBBBBnBBBtskffffhhhffffdfk##h",
"leqeBBBnBBBB#kkhfhffgfhffffdfd#p",
"llCqmBBmBBnmskfffhfhfhffdffddfuC",
"lgqeqmBnBBmtkfkfffffffffkffkdsss",
"llgqeqmmmmmtskkffhkfffkfkkdkkksu",
"lllg`cqccCe#sffkfkffkffkfkskkkd#",
"llllglCCeqCikkfkkffkfkkkkfksskks",
"llllllglgCqwssffkfkfkkkkkkskkks#",
"llllllllllhw#kdkfdkkffkksksfdske",
"lllllllllll`#kkkfffkskkkfdfksk#C",
"llllllllllhlwsksdkfkkkskskskku#h",
"llllllllllll`u#fkkdkfkskkfkdu#`l",
"lllllllllllglCwukksssskksdkduphl",
"llllllllllgllhp##sfkskkdkkuuClll",
"llllllllgllllll`#wukskkssw#`hllg",
"lllllllllllgllllhCCs##s#pphlllgl"
};
end-of-x11-pixmap-data
my $mw = new MainWindow;
$mw->Icon(-image => $mw->Photo( -data => $winicon));
MainLoop;
Regards,
-Sean
zentara - 27 Jun 2008 13:02 GMT
>Hi,
>I was under the impression that I can change the "Icon" for the
>"Mainwindow". I an using a ".XPM" image with a "transparent" color for
>background. When the window is displayed I get black background instead of
>transparent one. I have tested this with ".PNG". ".JPG" and ".GIF", they all
>exhibit the same behavior. Any help is appreciated din advance.
See http://perlmonks.org?node_id=439405
zentara

Signature
I'm not really a human, but I play one on earth.
http://zentara.net/CandyGram_for_Mongo.html