- This topic has 14 replies, 5 voices, and was last updated 5 years, 6 months ago by Lasse.
-
AuthorPosts
-
May 3, 2019 at 12:43 pm #38243Saeidd2016Participant
Hello,
There is a new problem in version 14.23 . When we set a TsAlphaImageList as image list of TVirtualTreeView component, it only shows grayed images and doesn't show colored images.
May 3, 2019 at 4:44 pm #59418JM-DGParticipant'Saeidd2016' wrote:Hello,
There is a new problem in version 14.23 . When we set a TsAlphaImageList as image list of TVirtualTreeView component, it only shows grayed images and doesn't show colored images.
It seems to be related to the recently changed BlendMode to the TsAlphaImageList component.
I made a demo testing the new feature and there are a few unexpected results. This is one of them.
I'll share the demo when I'll get home.
May 7, 2019 at 12:54 am #59426JM-DGParticipantIt may be unrelated but I realised that the grayed property of the bitbtn seems to behave inconsistently.
Let say I use an imagelist with an unchanged blendcolor clNone with white glyphs:
– The normal glyph color will be white: ok.
– When I set its property grayed to true, it becomes slightly colorblended depending of the skin (not grayed).
But then, when I use an imagelist with a custom blendcolor (let's say clred) with white glyphs:
– The normal glyph color will be red: ok.
– When I set its property grayed to true, it becomes properly grayed.
So my question is:
“If I use an imagelist with an unchanged blendcolor clNone with white glyphs & I set its property grayed to true, it becomes slightly colorblended depending of the skin (not grayed).”
Why is that?
May 8, 2019 at 4:59 am #59429SupportKeymasterWhich behavior do you expect?
May 8, 2019 at 11:53 am #59433JM-DGParticipant'Support' wrote:Which behavior do you expect?
Well I don't understand
why the glyph becomes slightly colored (light red) when grayed = true & the imagelist colorblend = clNone
But becomes actually grayed when grayed = true & the imagelist colorblend = clRed (example).
Why is it not grayed in both instances?
I'm not sure of what behavior to expect,
but in one instance (grayed = true) = glyph is colored
and in another instance (grayed = true) = glyph is actually grayed.
May 8, 2019 at 1:47 pm #59435Stephane SenecalParticipantI don't know if “Support” was confused between the look of the glyph when the button is Enabled = False and the Grayed property of the BitBtn, but I was. So I though I could add my input.
I too find it weird that the discoloration of an icon that has no color changes of color.
It is like if the icon was blended with the button color.
Stephane Senecal
CIS Group
Delphi programmer since 2001May 8, 2019 at 3:44 pm #59436JM-DGParticipant'Stephane wrote:I don't know if “Support” was confused between the look of the glyph when the button is Enabled = False and the Grayed property of the BitBtn, but I was. So I though I could add my input.
I too find it weird that the discoloration of an icon that has no color changes of color.
It is like if the icon was blended with the button color.
Yeah, thanks for your input. Sometimes I have a hard time expressing myself correctly in english. 🙂
May 9, 2019 at 6:32 pm #59437SupportKeymasterHello!
If Grayed property is True, then glyph is discolored, but some skins are looks ugly with gray glyphs.
Glyphs in such skins can have a changed color tone to the value, defined in the skin.
Dark glyph is not gray, this glyph have changed color tone too, but it's dark, because glyph color (Red) is dark.
Look my demo and screenshot, I hope, you will understand what I mean.
So, changing of color tone (by the Grayed property) is not depended from TsAlphaImageList.BlendColor value. Just dark icon looks not very good if Grayed=True and skin is dark.
May 13, 2019 at 6:45 pm #59456LasseParticipantThis issue still exists in version 14.24. Random icons have color and selected icon is quite black…
May 16, 2019 at 6:10 pm #59460LasseParticipantI commented out following lines from acAlphaImageList.pas to fix this for now…
1308: //if BlendColor clNone then
1309: // ChangeBitmapPixels(Result, ChangeColorTone, acColorToRGB(BlendColor), clFuchsia);
Hmm, in my ImageList BlendColor property is clNone… it should not go there.
May 22, 2019 at 4:57 am #59476SupportKeymasterHello, Lasse!
I think, your issue is not linked with this topic. Can you show a demo with black icon in the selected item?
May 23, 2019 at 11:03 am #59485LasseParticipantIt is. This was the first message: “When we set a TsAlphaImageList as image list of TVirtualTreeView component, it only shows grayed images and doesn't show colored images.”.
This issue happens only with virtual tree. I try to find time to create a small demo.
May 24, 2019 at 5:10 pm #59491Saeidd2016Participant'Lasse' wrote:It is. This was the first message: “When we set a TsAlphaImageList as image list of TVirtualTreeView component, it only shows grayed images and doesn't show colored images.”.
This issue happens only with virtual tree. I try to find time to create a small demo.
Yes I had wrote the first message. The problem still exists in v14.24 .
See the attached demo. I have two images in the AlphaImageList. The first image is grayed and the second is colored. The first image is shown correctly both in VirtualTreeView and sSpeedButton but when you set the image index of them to 1 (colored image) the image is shown as a white square.
[attachment=9303:ImageList.png]
[attachment=9302:Minimal.rar]
May 25, 2019 at 4:43 pm #59502SupportKeymasterThank you for the demo.
The reason of the problem is in the VirtualTrees.pas file. You can find there a line like this:
Code:Images.BlendColor := Color;BlendColor of the imagelist is changed to clWhite, glyph is white colored and not visible on the white background.
May 27, 2019 at 6:19 am #59512LasseParticipantOh, that seems to be a bug in VirtualTree. Setting a property like that is not a good idea.
-
AuthorPosts
- You must be logged in to reply to this topic.