[6.32] Form title quirks when migrating from 6.20

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #32956
    Iruau
    Participant

    Hi,

    When using 6.32, the font of the form title is way bigger than previously (I was using 6.20 before that).

    I didn't change anything in my own code or skin file, so the difference of behaviour comes from the new version of ASkin.

    Additionally, I couldn't find any way to change the font size in the form title. Unfortunately I had to revert to 6.20 because I can't ship my app due to that.

    Attached is the old (small font) and new (big font) form titles, so that you can see the difference.

    Best regards.

    #39250
    Support
    Keymaster

    Hello and thank you for screenshots.
    Please compare skinned captions font with font which used in the system (must be equal). If fonts are not equal, please show a screenshot of system font.

    #39309
    Iruau
    Participant

    Hi,

    The skinned caption font is indeed the same as the system font (Tahoma on WinXP).

    Thanks for your time.

    #39898
    Iruau
    Participant

    For the record, I managed to work around that problem by reverting procedure GetCaptionFontSize in acntUtils.pas to the 6.20 version (removing the {$IFDEF TNTUNICODE} part):

    CODE
    function GetCaptionFontSize : integer;
    var
      NonClientMetrics: TNonClientMetrics;
    begin
      NonClientMetrics.cbSize := SizeOf(NonClientMetrics);
      if SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, @NonClientMetrics, 0) then
        Result := NonClientMetrics.lfCaptionFont.lfHeight;
      else
        Result := 0;
    end;

    Seems to work fine so far.

    #39911
    Support
    Keymaster

    Why TNTUNICODE part was removed?
    What purpose of this reverting?

    #39945
    Iruau
    Participant

    When compiling 6.32 / 6.40 with TNTUNICODE enabled, there is a problem with SystemParametersInfoW : for an unknown reason it returns a bad value for lfCaptionFont.lfHeight, which makes the title font too big for me (BCB6 + ASkin 6.40 + TNT).

    I found that using SystemParametersInfo instead of SystemParametersInfoW solves the problem (so there is no need of the TNTUNICODE compiler switch here).
    Also, I see no compelling reason to use the W API here because you use only numerical results. Granted, the A and W APIs should theoretically return the same values but in practice they don't, at least in my environment, so I decided to use the correct one and share that with you.

    #39964
    Support
    Keymaster

    Ok, thank you!
    This part of code will be researched more and changes will be added in the next release.

    #40082
    Iruau
    Participant

    Now works fine in 6.41. Thanks.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.