Home › Forums › Konopka Signature VCL Controls (formerly Raize Components) › ChangeScale not called in Delphi 10.3
Tagged: changescale, scaleby, scaling
- This topic has 8 replies, 4 voices, and was last updated 2020-06-17 at 10:58 am by Andrew Sowerby.
-
AuthorPosts
-
-
January 29, 2020 at 3:48 am #1592
Hi,
I’m converting an older application with lots of Raize controls to Delphi 10.3
It seems Delphi 10.3 modified scaling again (compared to 2009 and XE7) and it seems the Raize components no longer work properly.
I created a test project with a single form, a few RzCheckboxes/Radiobuttons and a VCL Check and Radio button.
Run this on a 200% screen.
The VCL controls are scaled, the Raize components have a very small check/radio image.
I’ve traced this down to the following, in the VCL, the ChangeScale method has an additional parameter (isDpiChange). This has now become the new routine for scaling.
procedure TControl.ChangeScale(M, D: Integer; isDpiChange: Boolean);
ChangeScale calls the new method.
procedure TControl.ChangeScale(M, D: Integer); begin ChangeScale(M, D, False); end;
TControl.ScaleForPPI is called to do the actual scaling, and guess what:
procedure TControl.ScaleForPPI(NewPPI: Integer); begin if not FIScaling and (NewPPI > 0) then begin FIScaling := True; try if FCurrentPPI = 0 then FCurrentPPI := GetDesignDpi; if NewPPI <> FCurrentPPI then ChangeScale(NewPPI, FCurrentPPI, True); finally FIScaling := False; end; end; end;
TWinControl.ChangeScale optionally calls the old method
procedure TWinControl.ChangeScale(M, D: Integer; isDpiChange: Boolean); begin DisableAlign; try if not isDpiChange then ScaleControls(M, D); if (M <> D) and (csReading in ComponentState) and (sfDesignSize in ScalingFlags) then begin FDesignSize.X := MulDiv(FDesignSize.X, M, D); FDesignSize.Y := MulDiv(FDesignSize.Y, M, D); end; inherited ChangeScale(M, D, isDpiChange); ScalePadding(M, D); finally EnableAlign; end; end;
But in reality, the old method never gets called.
So, the Raize components use the old ChangeScale method and never get properly scaled.
I googled for this, but didn’t find anyone else experiencing these issues.
Are you?
With regards,
Martijn
-
January 31, 2020 at 12:14 am #1594
Hi Martijn,
While the google results may not show it, other users are indeed running into these sort of HighDPI related issues with the components. Embarcadero has done quite a bit of work in the VCL to provide better support for HighDPI, and I keep asking when the same work will be applied to KSVC (Embarcadero acquired KSVC in 2015), but as of yet no work has been done. It is very disappointing. As such, I would strongly suggest that you submit your bug report to Embarcadero.
Ray
-
January 31, 2020 at 3:15 am #1597
Hello Ray,
I figured I was barking up the wrong tree, but was surprised I didn’t find any results when googling.
I’ll report it and in the meantime, it seems I have to modify the components myself then.
Thanks.
With regards,
Martijn
-
January 31, 2020 at 9:35 am #1598
On a related note, has Embarcadero done anything with the components since they acquired them? New features? Bug fixes? It would be unfortunate if they did nothing.
-
February 9, 2020 at 8:52 pm #1613
Hi David,
Unfortunately, not really. Technically, they did modify the installation such that the components could be installed via GetIt without running a custom installer. Unfortunately, there were some issues with what they did. As for the components, themselves, no. Unfortunate, indeed.
Ray
-
June 16, 2020 at 2:37 am #1949
I see ksvc is now available with 10.4 Getit. However, the version is still 6.2.3, so does that mean that the High-DPI changes discussed here have not been incorporated – or perhaps, hopefully, they have?
Andrew
-
June 17, 2020 at 9:41 am #1951
As I suspected, I don’t think any High DPI changes have been made since 10.3. I tested a TRzRadioGroup at 100% and 175% scaling; at 175% the radio items were correctly scaled up, but the caption wasn’t – and was the same size at both scaling factors. A basic Delphi TRadioGroup displayed correctly at both scaling factors. This means that many of the Raize components I use (and I use a lot) cannot be used in my 10.4 High DPI conforming app update. This is extremely disappointing and will mean a lot of extra work to change these components to standard Delphi components. Pretty unacceptable given the huge subscription prices we pay!
-
June 17, 2020 at 10:04 am #1953
I complained to Embarcadero Support. The Support person said in their reply that they would “pass [my] concerns along to product management”, for what that’s worth.
-
June 17, 2020 at 10:58 am #1954
Well done, but I doubt it will have any effect. I’ve attached a comment to bug report RSP – 21178, but as that was submitted in Sept 2018 and is still open, it looks as though these controls have little importance within Emb – even though many of us use them extensively. Over to the basic Delphi controls I guess which, in a short test today, seem to work correctly visually with high scaling.
-
-
AuthorPosts
- You must be logged in to reply to this topic.