When using a TcxHintStyleController.HintStyle
of TcxHintStyle
with a SVG assigned to the Icon property, the glyph is painted without taking the current skin palette into account.
Example
I have attached the SVG used in the example. It is using a "Black" fill so in a dark skin (The Bezier, Blue Velvet in this case) it should have been painted white.
The glyph is painted in a local procedure in TcxHintViewInfo.Paint
:
Delphiprocedure DrawHintIcon;
var
R: TRect;
begin
if not Owner.Icon.Empty then
begin
R.InitSize(FIconOrigin, IconSize, IconSize);
if Owner.IconSize = TcxHintIconSize.cxisDefault then
R := cxRectCenter(R, Owner.Icon.Width, Owner.Icon.Height);
if Owner.InternalUseRightToLeftAlignment then
R := TdxRightToLeftLayoutConverter.ConvertRect(R, FHintWindowRect);
Owner.Icon.StretchDraw(ACanvas.Handle, R);
end;
end;
The call to Icon.StretchDraw
above is omitting the (optional) palette parameter that would have solved the problem. TdxCustomSmartImage.StretchDraw
looks like this:
Delphiprocedure StretchDraw(DC: HDC; const ADest: TRect; AAlpha: Byte = 255; APalette: IdxColorPalette = nil); overload;
Unfortunately it isn't possible to work around this problem, without rewriting the whole thing, since the relevant methods are non-virtual.