Show/Hide Series checkboxes too big

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
XRD_Tom
Newbie
Newbie
Posts: 8
Joined: Fri Oct 30, 2020 12:00 am

Show/Hide Series checkboxes too big

Post by XRD_Tom » Sat Jun 04, 2022 1:43 pm

Hello, we recently updated TChart sources from V2021.33 to V2022.35
and we are using Delphi 10.4, compiling for Win 64Bit.
There we noticed that suddenly all the checkboxes to show/hide series
are far too big, as soon as the Display Scaling is bigger than 100%.
The attached screenshot is for a Scaling of 150%:
150PerccentScalingCapture.PNG
150PerccentScalingCapture.PNG (334.4 KiB) Viewed 1562 times
CheckBoxesTooBigCapture.PNG
CheckBoxesTooBigCapture.PNG (129.38 KiB) Viewed 1562 times
Partially (for other charts) the Checkboxes get bigger than the whole chart.
Is there a fix available for this bug?

XRD_Tom
Newbie
Newbie
Posts: 8
Joined: Fri Oct 30, 2020 12:00 am

Re: Show/Hide Series checkboxes too big

Post by XRD_Tom » Thu Jun 16, 2022 6:52 am

Hello TChart Team,

This is really an annoying bug, with higher display scaling the Checkboxs and with that the legend tends to vanish completely.
Can you reproduce this problem at least, or can I help with that?
Something concerning Checkboxes seems to have changed in the recent release(s) but obviously, this change introduced a buggy behavior. At least with the Delphi version we are using. The current release of TChart is not usable for us.

Lukasz
Newbie
Newbie
Posts: 2
Joined: Mon Nov 15, 2021 12:00 am

Re: Show/Hide Series checkboxes too big

Post by Lukasz » Tue Jun 28, 2022 2:49 pm

Hi, i had the same problem.
In my situation i've changed 'scale' property in TeeGDIPlus component connected to Chart to 2, then back to value 1 and checkboxes are scaled properly. Don't ask my why and how this resolve the problem. Maybe i also recompiled my project after scale changed to 2 and second time after back to 1.

Yeray
Site Admin
Site Admin
Posts: 9174
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Show/Hide Series checkboxes too big

Post by Yeray » Tue Jun 28, 2022 3:42 pm

Thanks for reporting it.
We are investigating what happened and we'll be back here asap.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

XRD_Tom
Newbie
Newbie
Posts: 8
Joined: Fri Oct 30, 2020 12:00 am

Re: Show/Hide Series checkboxes too big

Post by XRD_Tom » Mon Jul 04, 2022 7:52 pm

Hello Lukasz, thank you for your tip, but we have many Charts in our Sofware. Going through all these Charts and changing the Scale property of all TeeGDIPlus components, doesn't seem to be a viable/real solution.
I wonder if we could simply replace the current scaling again with the working scaling, from the older TChart code?

Yeray
Site Admin
Site Admin
Posts: 9174
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Show/Hide Series checkboxes too big

Post by Yeray » Tue Jul 05, 2022 7:45 am

Hello,

I have two monitors, one at 100% and the other at 175%. I'm running the following test application:
HighDPI_RAD10.4.zip
(24.77 KiB) Downloaded 39 times
Starting the application at the 100% monitor and dragging it to the 175% monitor everything seems to be correctly resized:
HighDPI_RAD10_4_Swp08enjS3.png
HighDPI_RAD10_4_Swp08enjS3.png (45.73 KiB) Viewed 1230 times
Starting the application at the 175% monitor, fonts and checkboxes are a bit smaller than the standard components:
HighDPI_RAD10_4_sd25NTvn2M.png
HighDPI_RAD10_4_sd25NTvn2M.png (48.4 KiB) Viewed 1230 times
Could you please check how that test application works for you and modify it to reproduce the problem here if necessary?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

XRD_Tom
Newbie
Newbie
Posts: 8
Joined: Fri Oct 30, 2020 12:00 am

Re: Show/Hide Series checkboxes too big

Post by XRD_Tom » Tue Jul 05, 2022 1:12 pm

Hello Yeray,

I modified the example, when you press the "Create Chart and data" button (multiple times), just the Checkboxes keep growing. Everything else keeps roughly the correct size.
tChartWrongScalingCapture.PNG
tChartWrongScalingCapture.PNG (170.91 KiB) Viewed 1224 times
tChartWrongScaling2Capture.PNG
tChartWrongScaling2Capture.PNG (216.71 KiB) Viewed 1224 times
I also attached the modified project.

Thanks and best regards,

Thomas
Attachments
HighDPI_RAD10.4_Modified.zip
(24.78 KiB) Downloaded 39 times

Yeray
Site Admin
Site Admin
Posts: 9174
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Show/Hide Series checkboxes too big

Post by Yeray » Mon Jul 11, 2022 11:22 am

Hello,

Since you own the sources, I've sent a fix proposal to the mail account you have registered in these forums.
Extract the contents of the zip in your sources folder (backup it first) and rebuild TeeChart packages with TeeRecompile.
Please, tell us how it works at your side.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

XRD_Tom
Newbie
Newbie
Posts: 8
Joined: Fri Oct 30, 2020 12:00 am

Re: Show/Hide Series checkboxes too big

Post by XRD_Tom » Mon Jul 11, 2022 1:32 pm

Hello Yeray,

Great, I can confirm that your changes fixed this nasty bug, congrats !
Are these changes final?
I can see that certain properties are no more available, like "VCLTee.TeCanvas.TeeCheckBoxSize"
or "VCLTee.TeCanvas.TeeDrawCheckBox"

Best regards,

Thomas

Yeray
Site Admin
Site Admin
Posts: 9174
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Show/Hide Series checkboxes too big

Post by Yeray » Mon Jul 11, 2022 2:39 pm

Hello Thomas,

Thanks for confirming the proposal works for you.
The changes are one merge ahead of being final, pending for a revision.
If you have any doubt or worry, don't hesitate to let us know.
I'll check if TeeCheckBoxSize and TeeDrawCheckBox still make sense.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Yeray
Site Admin
Site Admin
Posts: 9174
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Show/Hide Series checkboxes too big

Post by Yeray » Tue Jul 26, 2022 11:02 am

Hello,
Yeray wrote:
Mon Jul 11, 2022 2:39 pm
I'll check if TeeCheckBoxSize and TeeDrawCheckBox still make sense.
In this merge request, TeeCheckBoxSize variable is substituted for a TeeDefaultCheckBoxSize const and a TChart's Aspect.CheckBoxZoom property which are used to calculate the final checkbox size like this:

Code: Select all

function TTeeCanvas.GetCheckBoxSize:Integer;
begin
  Result:=TeeDefaultCheckBoxSize;
  if (CheckBoxZoom<>100) then
     Result:=Round({$IFDEF FMX}Max(1,TeeDefaultCheckBoxSize*CheckBoxZoom*0.01){$ELSE}TeeDefaultCheckBoxSize*CheckBoxZoom*0.01{$ENDIF});
end;
This is the same way we already do for text sizes (and also for pen widths in this branch).

And regarding TeeDrawCheckBox method, we only added an extra parameter to it (CheckBoxSize:Integer=TeeDefaultCheckBoxSize) so the method should still be accessible. Isn't it accessible for you?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

XRD_Tom
Newbie
Newbie
Posts: 8
Joined: Fri Oct 30, 2020 12:00 am

Re: Show/Hide Series checkboxes too big

Post by XRD_Tom » Fri Jul 29, 2022 10:47 pm

Hello Yeray,

Thanks for the info, I will have a look at this when I am back in the Office, in about two weeks.

Best regards,

Thomas

Post Reply