HISE Logo Forum
    • Categories
    • Register
    • Login

    Preset browser LAF - hover?

    Scheduled Pinned Locked Moved Scripting
    7 Posts 3 Posters 93 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.
    • T
      tomekslesicki
      last edited by

      Is it possible to add a hover state to the preset browser list with LAF, without crating a custom preset browser from the ground up just for that?

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

        @tomekslesicki For the list items?

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

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

          with CSS, yes:

          const var laf = Content.createLocalLookAndFeel();
          
          Content.getComponent("FloatingTile1").setLocalLookAndFeel(laf);
          
          laf.setInlineStyleSheet("
          
          tr /** HTML table row => preset browser list item */
          {
          	background: red;
          }
          
          tr:hover
          {
          	background: green;
          }
          
          ")
          
          1 Reply Last reply Reply Quote 1
          • d.healeyD
            d.healey
            last edited by

            With standard laf, obj.hover, no?

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            T 2 Replies Last reply Reply Quote 0
            • T
              tomekslesicki @d.healey
              last edited by tomekslesicki

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • T
                tomekslesicki @d.healey
                last edited by

                @d-healey yes, thank you.

                @Christoph-Hart may I point a little inconsistency here? On some objects, obj.over works, on some it's obj.hover. Wouldn't it make sense to make both of these descriptions perform the same function in LAF?

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

                  @tomekslesicki I'm quoting your deleted post her because these are still valid questions:

                  thanks! How do I know which css classes correspond to which elements? Also - I remember seeing a commit when you allowed LAF and CSS to co-exist. How do I approach this?

                  This is documented in the Preset browser docs with a cheat sheet that shows all CSS identifiers for each component. However I've noticed that I haven't ported all the nice debugging tools that are available in the multipage dialog editor to the HISE CSS workflow, so I'll be doing that over time. For now I've added a simple overlay that shows some (but not all nested component IDs):

                  I remember seeing a commit when you allowed LAF and CSS to co-exist

                  Yes, this is now possible, you can give a single LAF object a style sheet as well as a script paint routine and it will use whatever is best (with the script functions always having the precedence over the style sheet definition with the exception of the popup menu styling which is CSS first).

                  On some objects, obj.over works, on some it's obj.hover. Wouldn't it make sense to make both of these descriptions perform the same function in LAF?

                  Yes that also annoyed me whenever I'm writing LAF functions. I obviously can't just correct the typo as this would break existing projects, but I can duplicate the property so that every LAF object that has over will get a hover property with the same value, then we can phase out over in 20+ years lol.

                  1 Reply Last reply Reply Quote 6
                  • First post
                    Last post

                  26

                  Online

                  1.8k

                  Users

                  12.0k

                  Topics

                  104.2k

                  Posts