ZoomPanel does not repaint when using DevEx Skin

Public forum for discussing TScaleRichView (shareware addon to TRichView providing WYSIWYG editing)
Post Reply
nyavorsky
Posts: 2
Joined: Tue Jun 30, 2015 11:06 am

ZoomPanel does not repaint when using DevEx Skin

Post by nyavorsky » Thu Sep 07, 2017 9:57 am

The SRVDxSkinAdapteк (DrawEditorFrame = True) does not change Srv.BackgroundProperty.ColorBegin ...ColorEnd, but Srv is painted according to DevEx Skin, but the ZoomPanel does not change the background color (because Srv.BackgroundProperty.ColorBegin ...ColorEnd not changed)
To change the background of the ZoomPanel I do the following
...
if Assigned(RootLookAndFeel.SkinPainter) then
begin
AColor := RootLookAndFeel.SkinPainter.DefaultControlColor;
BackgroundProperty.ColorBegin := AColor;
BackgroundProperty.ColorMiddle := AColor;
BackgroundProperty.ColorEnd := AColor;
// but this changes the ZoomPanel background three times (TSRVZoomPanel.Paint)
end;
...
What is the best way to change ZoomPanel background color - ?

Sergey Tkachenko
Site Admin
Posts: 13467
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: ZoomPanel does not repaint when using DevEx Skin

Post by Sergey Tkachenko » Fri Sep 22, 2017 10:28 am

Sorry for the delay.
Yes, a zooming panel is drawn using BackgroundProperty's gradient colors (even when a gradient fill is turned off, it is drawn using ColorBegin).
So your changes are correct.

However, for some skins results are not the best, because a zooming panel uses system (or VCL theme) colors for drawing text, lines and highlighting buttons.
In the next update, SRVDxSkinAdapter will change these colors as well.

nyavorsky
Posts: 2
Joined: Tue Jun 30, 2015 11:06 am

Re: ZoomPanel does not repaint when using DevEx Skin

Post by nyavorsky » Fri Sep 22, 2017 1:46 pm

Thank you. The code is actually somewhat different and smoothes some flaws

Sergey Tkachenko
Site Admin
Posts: 13467
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: ZoomPanel does not repaint when using DevEx Skin

Post by Sergey Tkachenko » Tue Sep 26, 2017 9:25 am

In ScaleRichView 7.9 (available for registered users) SrvDxSkin changes zooming panels.

Post Reply