Page 3 of 3
Re: Display settings and font size
Posted: Wed Sep 09, 2020 3:51 pm
by 16587426
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
Re: Display settings and font size
Posted: Thu Sep 10, 2020 5:55 am
by yeray
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.
Re: Display settings and font size
Posted: Thu Sep 10, 2020 3:40 pm
by 16587426
Thank you for the quick response.
Can I get the source to the demo as well?
Re: Display settings and font size
Posted: Mon Sep 14, 2020 6:25 am
by yeray
EdDressel wrote: ↑Thu Sep 10, 2020 3:40 pm
Can I get the source to the demo as well?
Sure!
Re: Display settings and font size
Posted: Thu Sep 17, 2020 2:43 pm
by 16587426
Thank you.
From our testing, we believe it is fixed. We will be releasing it to our customers next week.
Ed Dressel
Re: Display settings and font size
Posted: Fri Sep 18, 2020 5:38 am
by yeray
Great! Thanks for the feedback.
Re: Display settings and font size
Posted: Wed Dec 22, 2021 9:06 am
by yeray
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.