Closed luebbe closed 3 years ago
I've made some tests and notice a similar but strange issue: Form -> Panel (Color = clRed) -> SVGIconImage If Form.DoubleBuffered is False the SVGIconImage draw a Red Background only without VCLStyle active (uses clRed of Panel) If Form.DoubleBuffered is True the SVGIconImage draw a Red Background also with VCLStyle active (uses clRed of Panel) In past, when the SVGIconImage inherits from TGraphicControl (but without DoubleBuffer support) this problem was not present... In your example, is the Form or the Panel DoubleBuffered ?
Thanks for the hint. That may be a reason. I'll check, when I'm back at work tomorrow.
Yes, I can confirm that SvgImage.Parent.DoubleBuffererd := false solves the problem. Form.DoubleBuffered was true.
For the panel on which the bottom "Wifi" icon sits, I set ParentDoubleBuffered := false and DoubleBuffered := false and got the expected result.
You can close the ticket if you see no reason to change something in the code of SVGIconImageList. For me it means that I have to place the TSvgIconImage on a panel that has (Parent)DoubleBuffered := false.
Ok, but I don't know if this works correctly... I would like to investigate the problem further...
Yes, it would be good, because the standard behaviour yields an unexpected result and requires a workaround.
Double-buffering is an issue only with the TSVG backend. Direct2D does double-buffering anyway (I am not sure about Cairo). It was introduced because it make a large difference in rendering speed. But for small SVGs this does not matter.
new version of TSVGIconImage now derived from TGraphicControl to solve some painting issue. With Image32 lib the painting is fast. I'm closing this discussion: if you find some problems please reopen a new issue.
Hi Folks,
I have the following problem. I placed a TPanel on a Form and a TSVGIconImage on the TPanel. The TPanel has a color which is different from the window color. The application is using VCL Styles. Delphi 10.3.1
In the following screenshot the
In both cases the TSVGIconImage uses the window background color and not the color of the panel on which it sits. ParentBackground is true.
Obviously I want the TSVGIconImage to pick up its parent's color and not the window's color. How can I achieve this?