MainMenu font size runtime no effect (skinned)

Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #59590
    Support
    Keymaster

      Hello!

      This issue was solved in the v14.26, please check it.

      #59603
      SzakiLaci
      Participant
        'Support' wrote:

        This issue was solved in the v14.26, please check it.

        Upgraded to latest vesrion, as you've recommended. (v14.26)

        But it did NOT help.

        [attachment=9341:SkinnedMainMenu_minimalFontChange.png]

        On this picture the default size=8 Font has been set at runtime to:

        Code:
        Size:=20;
        Style:=[Bold,Italic];
        ScaleBy(180,100); // 180%

        As you can see it is painting with ca. size=9 , non-bold, non-italic

        (Non-skinned still works nicely.)

        Also tried to set “CustomFont := True” at design time >> no effect

        Basically: whatever I do at runtime, it does not have ANY effect on the font set at design time.

        #59613
        Support
        Keymaster

          Hello!

          Size of font in popup menu has been corrected in the previous release.

          But size of font in the main menu line can't be big, because size of menu items is controlled by Windows system and can't be scaled, unfortunately.

          I have no idea how to change sizes of these items, because it's handled by API.

          #59621
          SzakiLaci
          Participant
            'Support' wrote:

            … But size of font in the main menu line can't be big, because size of menu items is controlled by Windows system and can't be scaled, unfortunately.

            I have no idea how to change sizes of these items, because it's handled by API.

            As you can see on the 2th picture, yes, it CAN be changed, if non-skinned, both design at runtime!

            And YES, it can be changed if skinned at DESIGN time!

            Here is the proof: (size=8>>20 + fsBold)

            [attachment=9359:Size20_Bold_designTime.jpg]

            Only the 4th case is not working currently: skinned + runtime.

            So it CAN BE DONE! There is only a BUG that prevents to change it during runtime, while skinned.

            Yes, the size of the menu-height is the only thing that can NOT be changed, but that's ok.

            If you can make the font draw on top of the upper window-frame over it, that's perfectly fine.

            (on the picture the first menu word: MUVELETEK should appear as MŰVELETEK)

            At old versions it has worked this way. That means you must have changed something, that broke it.

            #59626
            Support
            Keymaster

              Technically, size of font may be changed easily, but items looks very strange if size of item is still small, but font is huge. That's what I meant.

              I can send you the changed unit and you can test it, if you wish.

              #59632
              SzakiLaci
              Participant
                'Support' wrote:

                Technically, size of font may be changed easily, but items looks very strange if size of item is still small, but font is huge. That's what I meant.

                I can send you the changed unit and you can test it, if you wish.

                Dear Serge, 🙂

                I don't know what you mean by “size of the item”, but I know 3 things:

                – customers are calling and complaining to me about “why did I changed the fonts of the menu so small”. 🙁

                – it worked fine before (at ca. 2 year older AC version)

                – if something “looks strange”, that's an opinion, but if nobody can read a text on a FullHD monitor,

                because this component is overriding my setting if I turn it ON:

                That IS a PROBLEM.

                So, until there is no better alternative to replace the TMainMenu > it would be nice, it would WORK as it did before.

                (By painting with a size we set, overlaying the window border/title.)

                Here is a 3th proof, that it looked perfectly fine in 2015:

                [attachment=9360:skin_bor.png]

                … and, as I've stated before >> it looks great too, if I turn OFF the skin. (See prev. picture.)

                #59642
                Support
                Keymaster

                  I have sent a changed file for test by PM

                  #59645
                  SzakiLaci
                  Participant
                    'Support' wrote:

                    I have sent a changed file for test by PM

                    – downloaded,

                    – uninstalled the whole component pack,

                    – installed (rebuilded fully!)

                    but it didn't made any difference! 🙁

                    Also tried to add:

                    Code:
                    sSkinProvider1.RepaintMenu();

                    http://www.alphaskins.com/afaq.php#T2

                    If I set MenuSupport.CustomFont > False;

                    it is loosing the design-time setting too! (And reverting to default size=8; style=[];

                    … while during runtime step-by-step debugging reports the opposite!

                    Code:
                    sSkinManager1.MenuSupport.Font.Size := 20;
                    sSkinManager1.MenuSupport.Font.Style := [fsBold, fsItalic];
                    #59646
                    SzakiLaci
                    Participant

                      Created a DEMO for you:

                      [attachment=9362:MenuSize.zip]

                      It seems if I turn CustomFonts Off and On again >> font size is changing! But space for it does not. 🙁

                      #59647
                      SzakiLaci
                      Participant

                        [attachment=9363:MenuSizeDemoExe.jpg]

                        #59650
                        Support
                        Keymaster

                          Thank you for the demo.

                          Look what I see.

                          When font size is changed without skins then font is changed in popup menu only

                          When font is changed with skins then font is changed in popup menu and in the menu line (this is a new behavior, previous behavior was like standard).

                          PS. Can we chat in the Skype? It's more effective, I think.

                          #59651
                          SzakiLaci
                          Participant
                            'Support' wrote:

                            Thank you for the demo.

                            Look what I see.

                            When font size is changed without skins then font is changed in popup menu only

                            When font is changed with skins then font is changed in popup menu and in the menu line (this is a new behavior, previous behavior was like standard).

                            PS. Can we chat in the Skype? It's more effective, I think.

                            Hi,

                            YES, but I can force-refresh non-skinned menu >> so it's fine!

                            But I can not:

                            – repaint skinned menu after font change >> nothing happens

                            + it should draw the upper-part of bigger fonts on top of the title bar.

                            This 2 things needs to be fixed.

                            You have to know : your forum system usually does NOT sends any notification, if a topic changed! (Even if Watching is > ON >> and “immediate” is set.)

                            I'm PM-ing you my SkyPe. (I don'T know yours)

                            Thanks!

                            #59652
                            SzakiLaci
                            Participant

                              This is what I ment by: “it should draw the upper-part of bigger fonts on top of the title bar.” >>

                              [attachment=9366:submenu_override.jpg]

                              #59653
                              SzakiLaci
                              Participant

                                [Dirty Solution]

                                After trying 30 different ways, the ONLY solution I have found is:

                                (Using the patched sSkinMenu.pas file Serge sent me.)

                                Code:
                                procedure TFrm_MenuSize.mmResize();
                                var f: integer;
                                MI: TMenuItem;
                                begin
                                f := round( (Screen.PixelsPerInch / 96) * sspe_FontSize.Value) ;
                                if not sSkinManager1.Active then begin // NON-SKINNED
                                Screen.MenuFont.size := f;
                                Screen.IconFont.size := f;
                                end
                                else begin
                                // sSkinManager1.MenuSupport.CustomFont := False;
                                sSkinManager1.MenuSupport.Font.Size := f;
                                sSkinManager1.MenuSupport.Font.Style := [fsBold]
                                sSkinManager1.MenuSupport.ExtraLineFont.Size := f+2;

                                sSkinManager1.MenuSupport.CustomFont := True; // <<< THIS IS the most important line !!! It will re-build the font

                                // sSkinProvider1.RepaintMenu(); // FAQ says it needed, but it does not help fully http://www.alphaskins.com/afaq.php#T2
                                // sSkinProvider.UpdateSkinCaption(sSkinProvider1);
                                end;

                                MI := MainMenu1.Items[MainMenu1.Items.count-1]; // last item … so it won't flicker too much
                                MI.Visible := not MI.Visible; // turn OFF / ON … or the opposite >>> it will recalculate all item's WIDTH
                                MI.Visible := not MI.Visible;
                                end;

                                #59661
                                Support
                                Keymaster

                                  Try this code, it's enough, I think:

                                  Code:
                                  var
                                  s: string;
                                  begin
                                  Screen.MenuFont.Size := 22;
                                  s := N31.Caption;
                                  N31.Caption := N31.Caption + ' ';
                                  N31.Caption := s;
                                  end;

                                  CustomFont is not required, maybe.

                                  #59712
                                  SzakiLaci
                                  Participant
                                    'Support' wrote:

                                    Try this code, it's enough, I think:

                                    Code:
                                    var

                                    N31.Caption := N31.Caption + ' ';
                                    end;

                                    CustomFont is not required, maybe.

                                    No, sadly it does NOT work. That was the first thing I've tried.

                                    As I've wrote before: I'm over ca. 30 different scenarios, spent 1.5 days with it.

                                    CustomFont IS required too!

                                    … except you have changed something in your code at 14.26 >> 14.27 ?

                                    #59713
                                    SzakiLaci
                                    Participant
                                      'SzakiLaci' wrote:

                                      This is what I ment by: “it should draw the upper-part of bigger fonts on top of the title bar.” >>

                                      [attachment=9366:submenu_override.jpg]

                                      Any progress on Overdrawing on the outside elements? (Title bar)

                                      ________

                                      Also I have noticed, the skinned draw happens AFTER normal menu is drawn first.

                                      Since I'm using a 10+ year old (XP) laptop to test speed, I can visually SEE the update happens 2x. (1th: normal menu is drawn, after that 2th skinned menu is overdrawn)

                                      #59719
                                      Support
                                      Keymaster
                                        Code:
                                        var
                                        s: string;
                                        begin
                                        Screen.MenuFont.Size := 22;
                                        s := N31.Caption;
                                        N31.Caption := N31.Caption + ' ';
                                        N31.Caption := s;
                                        end;

                                        Should work with my patched file and with v14.27, yes.

                                        If it's not working yet, please specify the problem, size of font is not changed?

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