Ticket T1270641
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

TcxHintStyleController - Hint icons do not use the current skin's palette

TcxHintStyleController doesn't take skin palette into account for Icon

created 3 months ago

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
Clipboard-File-2.png
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:

Delphi
procedure 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:

Delphi
procedure 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.

Answers approved by DevExpress Support

created 3 months ago

Hello Anders,

Thank you for your research. We will examine this use case and update the following thread once we have news: TcxHintStyleController - Hint icons do not use the current skin's palette.

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.