Ticket T1263794
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

Ribbon button captions are incorrectly scaled if the form's ParentFont is set to True

Ribbon button captions are incorrectly scaled

created 5 months ago (modified 5 months ago)

[DevExpress Support Team: CLONED FROM T1073008: Multiple HighDPI scaling issues with skinned application]

Problem #1 has still not been resolved; Ribbon buttons does not scale correctly.

Isn't it about time this got fixed?

Show previous comments (4)

    Did you add the capability to assign the font globally to your application?

    Some applications does that and some do not.

    Regardless, the main reason to have ParentFont=True on all forms is to avoid forms using a wrong font if/when the system default font changes. For example, Delphi used to have Tahoma as the default font and before that Arial and MS Sans Serif.

    AP AP
    Alex Pa (DevExpress Support) 4 months ago

      Hello Anders,

      Thank you for the clarification.

      I discussed this use case, and we decided to keep the current behavior as it is due to the following:

      • Our scaling mechanisms are rather complex, and a possible fix may possibly have unexpected side effects.
      • While the fix addresses this particular issue, there are still possible issues with other controls and usage scenarios, especially since some IDEs may not correctly handle a form's parent font either. For example, I tested the attached project with RAD Studio 11.3 Alexandria and got the following result:
      • I examined our database but didn't find many cases where ParentFont is used. While we agree that the capability to assign fonts at the application level may make the design process easier, the lack of demand suggests that a fix would not address the needs of our user community.

      As a workaround, you can try assigning required font settings (e.g., font names) manually.

        That wans't really the response I had expected.

        I know for a fact that ParentFont=True has been in wide use as can be seen by the number of people that have reported issues with it against the VCL's HighDPI support.

        I also fail to see how an example of a bug in the VCL (your attached project) has any relevance to the issue I reported. The VCL still has numerous problems with HighDPI (ParentFont=True being one of them) but I really don't expect that to mean that DevExpress should have the same problems. I expect you to solve problems even when Embarcadero fails to.

        I understand that any change you make can have potential side effects but if you look at my example workaround you can see that:

        1. It only applies to the case where ParentFont=True, so it will not affect other cases.
        2. You already fail to properly support ParentFont=True (as I have shown), so any breakage caused by a workaround isn't really relevant; You wouldn't be breaking something that wasn't already broken.

        Answers approved by DevExpress Support

        created 4 months ago (modified 4 months ago)

        Hello Anders,

        Thank you for your feedback. We understand your position.

        The key point is that IDEs prior to RAD Studio 12 Athens may not handle ParentFont correctly for all cases, so potential improvements may not bring any meaningful benefit since the issue will still take place with standard components.

        Regarding the test case with standard VCL controls, I tested it with RAD Studio Alexandria 11.3 and 150% (main) and 100% (secondary) monitors.

        Regarding RAD Studio Athens, could you please test the following source code modification? You need to replace the TdxCustomRibbonForm.ScaleForPPI procedure implementation (dxRibbonForm.pas) with the following code:

        Delphi
        procedure TdxCustomRibbonForm.ScaleForPPI(ATargetDPI: Integer; AWindowRect: PRect = nil); begin if ParentFont or not (csLoading in ComponentState) then inherited; end;
          Comments (2)

            The key point is that IDEs prior to RAD Studio 12 Athens may not handle ParentFont correctly for all cases, so potential improvements may not bring any meaningful benefit since the issue will still take place with standard components.

            That's true - but luckily we're not using standard controls; We're using DevExpress controls :-)

            Regarding RAD Studio Athens, could you please test the following source code modification?

            I can confirm that your modification solves the problem.

            AP AP
            Alex Pa (DevExpress Support) 4 months ago

              Thank you for the update. We plan to add this modification to our source code: Ribbon button captions are incorrectly scaled if the form's ParentFont is set to True.

              Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

              Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.