ChangeScale not called in Delphi 10.3

Home Forums Konopka Signature VCL Controls (formerly Raize Components) ChangeScale not called in Delphi 10.3

Viewing 8 reply threads
  • Author
    Posts
    • #1592
      Martijn Tonies
      Participant

        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

      • #1594
        Ray Konopka
        Keymaster

          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

        • #1597
          Martijn Tonies
          Participant

            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

          • #1598
            David Marcus
            Participant

              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.

            • #1613
              Ray Konopka
              Keymaster

                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

              • #1949
                Andrew Sowerby
                Participant

                  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

                • #1951
                  Andrew Sowerby
                  Participant

                    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!

                  • #1953
                    David Marcus
                    Participant

                      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.

                    • #1954
                      Andrew Sowerby
                      Participant

                        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.

                    Viewing 8 reply threads
                    • You must be logged in to reply to this topic.