HISE Logo Forum
    • Categories
    • Register
    • Login

    Look and Feel - Toggle Buttons and the MIDI Sources panel...

    Scheduled Pinned Locked Moved Bug Reports
    62 Posts 7 Posters 4.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ustkU
      ustk
      last edited by

      It's not only this, the popups too and their buttons, and a lot of things...
      It's because the buttons/sliders used are the same in front/backend and the laf aren't separated. it should be doable but it might require a lot of redundant modifications...

      Can't help pressing F5 in the forum...

      1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart
        last edited by

        You can reset the look and feel so that it looks right until the next time you compile, which should solve most workflow issues.

        The problem is that the look and feel is global so it would be a massive rewrite in order to fix it.

        LindonL d.healeyD 2 Replies Last reply Reply Quote 1
        • LindonL
          Lindon @Christoph Hart
          last edited by

          @Christoph-Hart - then its not really worth having is it - I might as well just use customer painted panels..

          HISE Development for hire.
          www.channelrobot.com

          1 Reply Last reply Reply Quote 0
          • Christoph HartC
            Christoph Hart
            last edited by

            Why? If you want to change anything in the module tree, reset the look and feel, until you work on the UI again, then recompile the script.

            LindonL 1 Reply Last reply Reply Quote 0
            • LindonL
              Lindon @Christoph Hart
              last edited by

              @Christoph-Hart said in Look and Feel - Toggle Buttons and the MIDI Sources panel...:

              Why? If you want to change anything in the module tree, reset the look and feel, until you work on the UI again, then recompile the script.

              yes - sure but nothing I do (including commenting out the LaF where @ustk and I identified) does not solve this problem:

              set your combo box to some LaF and it breaks the Custom Settings Tile:

              d952efbf-aa32-4f12-9a12-c7171418cfba-image.png

              So LaF is not usable right now.

              HISE Development for hire.
              www.channelrobot.com

              Casey KolbC 1 Reply Last reply Reply Quote 0
              • Casey KolbC
                Casey Kolb @Lindon
                last edited by

                @Lindon Can you post a code snippet (not a HISE snippet) of what you’re doing to the LaF combobox customizations? I customized my comboboxes without any issues to the settings. You might be able to throw an exception for certain comboboxes too.

                Casey Kolb
                Founder & CEO of Lunacy Audio
                Composer | Producer | Software Developer

                LindonL 1 Reply Last reply Reply Quote 0
                • LindonL
                  Lindon @Casey Kolb
                  last edited by

                  @Lunacy-Audio sure here:

                  
                  laf.registerFunction("drawPopupMenuBackground", function(g, obj)
                  {
                      g.fillAll(0xFF222222);
                      g.setColour(0x9F5AC4EC);
                      
                      g.drawRect([0, 0, obj.width, obj.height], 1);
                  });
                  
                  laf.registerFunction("drawPopupMenuItem", function(g, obj)
                  {
                      var a = obj.area;
                      var h = a[3];
                      
                      if(obj.isSeparator)
                      {
                          g.setColour(Colours.white);
                          g.drawLine(a[0]+10, a[0] + a[2]-10, a[1] + a[3]/2, a[1] + a[3]/2, 1.0);
                          return;
                      }
                      
                      if(obj.isTicked)
                      {
                          g.setColour(0x9F5AC4EC);
                          g.fillEllipse([a[0] + h/3, a[1] + h/3, h/3, h/3]);
                      }
                      
                      g.setFont("Verdana", 16.0);
                      
                      if(obj.isHighlighted)
                      {
                          g.setColour(0x9F5AC4EC);
                          g.fillRect(obj.area);
                          g.setColour(Colours.white);
                          g.drawAlignedText(obj.text, [a[0] + h, a[1], a[2] - h, a[3]], "left");
                      }else{
                          g.setColour(Colours.white);
                          g.drawAlignedText(obj.text, [a[0] + h, a[1], a[2] - h, a[3]], "left");
                      }
                      
                  });
                  

                  HISE Development for hire.
                  www.channelrobot.com

                  1 Reply Last reply Reply Quote 0
                  • Casey KolbC
                    Casey Kolb
                    last edited by

                    @Lindon Ok this is an easy fix. You just need to add a customization for the combobox as well. Just tested this on most recent scriptnode and it's working. This is what I have it set to:

                    laf.registerFunction("drawComboBox", function(g, obj) {
                        var a = obj.area;
                        g.setColour(0x00FFFFFF); // make transparent
                        g.fillRoundedRectangle(a, 1.0);
                        g.setColour(Colours.withAlpha(0xFFACACAC, (obj.enabled && obj.active) ? 1.0 : 0.2));
                        g.drawAlignedText(obj.text, [a[0] + 10, a[1], a[2] - 30, a[3]], "left");
                        var h = a[3];
                        g.fillTriangle([a[0] + a[2] - h/3 - 10, a[1] + h/3, h/3, h/3], Math.PI);
                    });
                    

                    Casey Kolb
                    Founder & CEO of Lunacy Audio
                    Composer | Producer | Software Developer

                    LindonL 2 Replies Last reply Reply Quote 0
                    • LindonL
                      Lindon @Casey Kolb
                      last edited by

                      @Lunacy-Audio thanks Casey - however....

                      Whilst I'm sure this works I have discovered a huge tranch of my current problems with HISE (failing to save, locking up etc.) all go away when I stop using LaF, so I've decided that LaF is "broken for me" - and I will use discreet panels to get the visual layout I want.

                      HISE Development for hire.
                      www.channelrobot.com

                      Casey KolbC 1 Reply Last reply Reply Quote 0
                      • LindonL
                        Lindon @Casey Kolb
                        last edited by Lindon

                        @Lunacy-Audio - and of course this fails to solve the problem if you want your combo box text to be black;

                        laf.registerFunction("drawComboBox", function(g, obj) {
                            var a = obj.area;
                            g.setColour(obj.bgColour); // 
                            g.fillRoundedRectangle(a, 1.0);
                            g.setColour(Colours.black);
                            g.drawAlignedText(obj.text, [a[0] + 10, a[1], a[2] - 30, a[3]], "left");
                            var h = a[3];
                            g.fillTriangle([a[0] + a[2] - h/3 - 10, a[1] + h/3, h/3, h/3], Math.PI);
                        });
                        

                        As the Audio Settings panel ignores this:

                        g.setColour(obj.bgColour);

                        and sets the combo box colours to black, tho it does recognise the transparency. So really the Audio Settings widget ISNT obeying LaF guidelines.

                        HISE Development for hire.
                        www.channelrobot.com

                        1 Reply Last reply Reply Quote 0
                        • Casey KolbC
                          Casey Kolb @Lindon
                          last edited by

                          Whilst I'm sure this works I have discovered a huge tranch of my current problems with HISE (failing to save, locking up etc.) all go away when I stop using LaF, so I've decided that LaF is "broken for me" - and I will use discreet panels to get the visual layout I want.

                          Yikes! Very strange indeed. I've used just about all the possible LaF's on my project and haven't experienced this. I wonder if it's an OS version thing?

                          Casey Kolb
                          Founder & CEO of Lunacy Audio
                          Composer | Producer | Software Developer

                          1 Reply Last reply Reply Quote 0
                          • Christoph HartC
                            Christoph Hart
                            last edited by

                            One thing to keep in mind (I think I've mentioned this in the docs) is that the methods that you give the LAF object must never access script variables outside their scope. These functions are executed directly in the UI rendering and everything else in HISE is being executed on a dedicated thread and is more robust in the sense that there aren't too many weird concurrency issues.

                            LindonL 1 Reply Last reply Reply Quote 1
                            • LindonL
                              Lindon @Christoph Hart
                              last edited by

                              @Christoph-Hart - yeah that aint it.. here's my entire LaF code:

                              
                              laf.registerFunction("drawPopupMenuBackground", function(g, obj)
                              {
                                  g.fillAll(0xFF222222);
                                  g.setColour(0x9F5AC4EC);
                                  
                                  g.drawRect([0, 0, obj.width, obj.height], 1);
                              });
                              
                              laf.registerFunction("drawPopupMenuItem", function(g, obj)
                              {
                                  var a = obj.area;
                                  var h = a[3];
                                  
                                  if(obj.isSeparator)
                                  {
                                      g.setColour(Colours.white);
                                      g.drawLine(a[0]+10, a[0] + a[2]-10, a[1] + a[3]/2, a[1] + a[3]/2, 1.0);
                                      return;
                                  }
                                  
                                  if(obj.isTicked)
                                  {
                                      g.setColour(0x9F5AC4EC);
                                      g.fillEllipse([a[0] + h/3, a[1] + h/3, h/3, h/3]);
                                  }
                                  
                                  g.setFont("Verdana", 16.0);
                                  
                                  if(obj.isHighlighted)
                                  {
                                      g.setColour(0x9F5AC4EC);
                                      g.fillRect(obj.area);
                                      g.setColour(Colours.white);
                                      g.drawAlignedText(obj.text, [a[0] + h, a[1], a[2] - h, a[3]], "left");
                                  }else{
                                      g.setColour(Colours.white);
                                      g.drawAlignedText(obj.text, [a[0] + h, a[1], a[2] - h, a[3]], "left");
                                  }
                              });
                              
                              laf.registerFunction("drawToggleButton", function(g, obj)
                              {
                                  var a = obj.area;
                                  if (a[2] == a[3])
                                  {
                                      g.setColour(Colours.darkgrey);
                                      g.drawEllipse([1,1,a[2]-3,a[3]-3], 2);
                                      if(obj.value)
                                      {
                                          g.setColour(obj.bgColour);
                                          g.fillEllipse([4,4,a[2]-9,a[3]-9]);
                                      }
                                  }else{
                                      if (obj.value)
                                      {
                                          g.setColour(Colours.grey);
                                          g.setFont("Verdana Bold", 14.0);
                                          g.drawAlignedText(obj.text, obj.area, "centred");
                                          g.setColour(obj.bgColour);
                                          g.drawLine(0, 76, obj.area[3]-5,obj.area[3]-5, 4);
                                      }else{
                                          g.setColour(Colours.grey);
                                          g.setFont("Verdana Bold", 14.0);
                                          g.drawAlignedText(obj.text, obj.area, "centred");
                                      
                                      }
                                  }
                              });
                              
                              
                              

                              HISE Development for hire.
                              www.channelrobot.com

                              1 Reply Last reply Reply Quote 0
                              • d.healeyD
                                d.healey @Christoph Hart
                                last edited by

                                @Christoph-Hart said in Look and Feel - Toggle Buttons and the MIDI Sources panel...:

                                You can reset the look and feel

                                How?

                                ustkU 1 Reply Last reply Reply Quote 0
                                • ustkU
                                  ustk @d.healey
                                  last edited by

                                  @d-healey I might have wrong but I think Christoph's saying you can comment out the custom LAF and re-activate it when you're ready to export your plugin.

                                  Can't help pressing F5 in the forum...

                                  d.healeyD 1 Reply Last reply Reply Quote 1
                                  • d.healeyD
                                    d.healey @ustk
                                    last edited by d.healey

                                    @ustk Nope, that doesn't reset it.

                                    Docs aren't helpful either - https://docs.hise.audio/working-with-hise/menu-reference/view/index.html#reset-custom-look-and-feel

                                    And I've got the same problem as @Lindon. I'm not even using LAF for comboboxes in my script.

                                    @Christoph-Hart - In fact as soon as you add this line const var laf = Engine.createGlobalScriptLookAndFeel(); to your script and compile it will turn all of the settings floating tile comboboxes black, try it yourself.

                                    f271a7d2-db57-4b77-b454-820644f1d991-image.png

                                    Update:
                                    Look what I found :) Doesn't fix the settings panel though.

                                    067cb79b-1232-4242-94cf-b7d7ba6a02fa-image.png

                                    ? 1 Reply Last reply Reply Quote 2
                                    • ?
                                      A Former User @d.healey
                                      last edited by A Former User

                                      @d-healey

                                      Try this....LAF.gif ..
                                      IF it doesn't work save the XML close HISE and reload the project/open XML.

                                      d.healeyD 2 Replies Last reply Reply Quote 1
                                      • ?
                                        A Former User
                                        last edited by

                                        HiseSnippet 1496.3ocwW80aaaCDWJMJnwcYsEn.CCXOHjG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qXe4kFOtz0To6EbJEKJcYUIWwUswprH+QXQcPgoQ34LB0gJVnaoqWgNWc0mbLxY6wHxWFfSlmUJrYIkBMRJeoJJlfPfUYbIw6kTRL8JrAwSUQLcZSiXUHe6HF+3d6fjnTgAxENq.rPRTpj4N32.sqnq2tr0N3vSk7.33.IFvYJTXVQezqjVMFwvz3y81VwiaZbtgoko5rlkN3Lhmb5bXz9WaOEqRxkArYsGwEdXwgHORTXd.qoOj71BpAjxvOsOokWZy09xeuH0VJxewCt6eDycNzacMMbmmcZNsmkMoZaezb8KufuiLoGJsf6S4HIgM4HBbiPI76ZkmT9C3mcye.eU6D+xQI.sWTnj6ODKU6MzXzjL8FX+hOzZ7m+1EWTh0Hkbr6eg2ZZEmaa0cDPFDwpOwVJhv00jhuDTfzKijAQxBj5FMdr1wTf7Pje.EeHDhTfrt6otCNnHyPBFjOnWGv8tjXbQTbeH+FuH1hamtiOjTUdPDURBnjKg9dTLRn5WsWuR.19bWjJb+RJ7nnqDB6CkMf0NVm0yowl0SGsU5PHC17QsxHlNpUCG0fSfbboQCVl6.2hRiDrLOScm5Ca6EZ9l6EQU8ckuib0mdjr.nNEZ8U0dKKjHmk+SS9DZS2oz1zKM2z0Dt22Z.Q5Nsb7tPI3ExO8eMdS9nmUr1EtG6Jy.6hV8+oa5W37I.Enw.UDMTCTPTYTdQj+PHV0ECHgA4QCU2IVPkjQO2IMqyPLyKdxEvSxhMUyMSVrY5hF9HWA+0t5pFpOq51wT.Lwh+hxkgOsElaOuPgkkSCGCeH540ttJSwZ.1KeOstA6Y8avd13FrmMuA64atA6Yqavd91qbOpDWchfD95vDfvfciyXaZtqt2O0MRi+FP+myEH
                                        
                                        1 Reply Last reply Reply Quote 0
                                        • ?
                                          A Former User
                                          last edited by A Former User

                                          Transparent 2.jpg Transparent 1.jpg
                                          LAF with Custom settings (Transparent BG)

                                          1 Reply Last reply Reply Quote 0
                                          • d.healeyD
                                            d.healey @A Former User
                                            last edited by

                                            This post is deleted!
                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            25

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            102.7k

                                            Posts