Double High DPI scaling in TAdvSmoothTimeLine.GetTimeLineRect and GetTimeLineBarRect

There seems to be a double scaling of TimeLineBar.Height in TAdvSmoothTimeLine.GetTimeLineRect and TAdvSmoothTimeLine.GetTimeLineBarRect.

The relevant code in both methods looks like this:

  DPIScale := GetDPIScale(Self, Canvas);
  cHM := Round(DPIScale * HorizontalMargin);
  cVM := Round(DPIScale * VerticalMargin);
  cH := Round(DPIScale * TimeLineBar.Height);

It is just that TimeLineBar.Height is already adjusted to the current DPI. Thus the following calculations are done with a double scaled Height value.

Do you have more details about situation where you see a wrong result due to this?
I retested this here on 150% DPI and could not see an incorrect TimeLineBar.Height used in drawing. In the code, I could also not see where results from both GetTimeLineRect and GetTimeLineBarRect are used?

This is how 100% and 150% look here:

My fault! I had code in TTimeLine.OnResize that sets TimeLineBar.Height with respect to TimeLine.Height. As I assumed that TimeLineBar.Height is scaled on DPI change, I missed to downscale the value before assignment. Sorry about the confusion.

OK, thanks for informing.