In some reasons, i want to make PtButton or PtLable translucence,about 50%,becaue i want to see the background behind the button.But i dont know how…is there someone can tell me ? Thank u~~
I’m not sure if this is possible, if it is, I’d like to do it myself! However, what you could do is make the PtButton completely transparent, and put an alpha-blended picture inside the button.
i am a begginer,so i dont know what alpha-blended picture is.can u tell me more about it?
What’s more,the button’s Lable Type is PT_IMAGE,so i think i cant put a picture inside it.
Alpha blending is just applying a degree of transparency to a picture, so you could make a picture of a red rectangle 50% translucent, so you could see through it, but it would still appear red. I suppose you could compare the effect to a stained glass window, you can see through the window, but it’s colours affect what you see behind the window. You can easily make one in the Gimp. If you’re not sure, I’ll send you one which you can put on a button.
i know how to make a picture of a red rectangle 50% translucent in Photoshop,but i dont know how to make one in Phab.If u can send one to email@example.com,i will be very happy:)Thank u~
Just use the one you made in Photoshop, save it out as a PNG and make it an image on the button, that can be done in code or in PhAb. This will give you an image, but you may not be able to position text the way you want it on top of the image, so you might want to make a custom widget in PhAb based on two PtButtons, both transparent, one on top of the other, one containing the text, and one containing the imag. I’ve never done this myself, but there is no reason why it should not work.
i have tried your way, but it failed.When i import the PNG file into PtLabel as “Label Image”,it become opacity:(
i tried this in PhAB 2.03.
I used to have a similar problem, what video driver are you using?
video driver?i cant understand u absolutely.
My video card is Nvidia GeForce2 MX 200,so i use Nvidia public driver
Well, I used to use the standard QNX VESA driver under my self-hosted QNX machine, and alpha blended graphics often did not show up correctly (or at all), after changing to the vesatweek driver, all is well.