Display settings and font size

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
EdDressel
Newbie
Newbie
Posts: 35
Joined: Mon Nov 25, 2019 12:00 am

Re: Display settings and font size

Post by EdDressel » Wed Sep 09, 2020 3:51 pm

Thank you for your response.

A couple of items in response:

1) Is this what you are recommending for ChangeScale:

Code: Select all

{$IFNDEF FMX}
procedure TCustomTeePanel.ChangeScale(M, D: Integer{$IFDEF D24}; isDpiChange: Boolean{$ENDIF});
begin
  inherited;

//  if M <> D then
//  begin
//    Canvas.FontZoom:=FView3DOptions.FontZoom*M/D;
//    FView3DOptions.FontZoom:=Round(Canvas.FontZoom);
//  end;
end;
{$ENDIF}
Do I also remove the "inherited;" as well?

2) Can you send attach a demo so I can test?

Much appreciated.

Ed Dressel
Ed Dressel
President
RetireReady Solutions

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

Re: Display settings and font size

Post by Yeray » Thu Sep 10, 2020 5:55 am

Hello,
EdDressel wrote:
Wed Sep 09, 2020 3:51 pm
Do I also remove the "inherited;" as well?
In the tests I've done here I don't see any difference but in general I would leave the inherited or remove the full override method.
EdDressel wrote:
Wed Sep 09, 2020 3:51 pm
Can you send attach a demo so I can test?
Sure. Here it is.
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

EdDressel
Newbie
Newbie
Posts: 35
Joined: Mon Nov 25, 2019 12:00 am

Re: Display settings and font size

Post by EdDressel » Thu Sep 10, 2020 3:40 pm

Thank you for the quick response.

Can I get the source to the demo as well?
Ed Dressel
President
RetireReady Solutions

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

Re: Display settings and font size

Post by Yeray » Mon Sep 14, 2020 6:25 am

EdDressel wrote:
Thu Sep 10, 2020 3:40 pm
Can I get the source to the demo as well?
Sure!
Display Size.zip
(25.82 KiB) Downloaded 1604 times
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

EdDressel
Newbie
Newbie
Posts: 35
Joined: Mon Nov 25, 2019 12:00 am

Re: Display settings and font size

Post by EdDressel » Thu Sep 17, 2020 2:43 pm

Thank you.

From our testing, we believe it is fixed. We will be releasing it to our customers next week.

Ed Dressel
Ed Dressel
President
RetireReady Solutions

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

Re: Display settings and font size

Post by Yeray » Fri Sep 18, 2020 5:38 am

Great! Thanks for the feedback.
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: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Display settings and font size

Post by Yeray » Wed Dec 22, 2021 9:06 am

Hello,

This is just to inform another change had been introduced affecting DPI awareness and ChangeScale. This change entered the main branch a few days after v2021.33 was released so, if nothing changes, the next release will be the first to include this code:

Code: Select all

    {$IFNDEF FMX}
    procedure ChangeScale(M, D: Integer{$IFDEF D24}; isDpiChange: Boolean{$ENDIF}); override;
    {$ENDIF}

Code: Select all

{$IFNDEF FMX}
procedure TCustomTeePanel.ChangeScale(M, D: Integer{$IFDEF D24}; isDpiChange: Boolean{$ENDIF});
begin
  inherited;

  if not (csLoading in Self.ComponentState) and (M <> D) then
  begin
    Canvas.FontZoom:=MulDiv(FView3DOptions.FontZoom, M, D);
    FView3DOptions.FontZoom:=Round(Canvas.FontZoom);
  end;
end;
{$ENDIF}
It's basically the same code here with a new not (csLoading in Self.ComponentState) condition.
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

Post Reply