HISE Logo Forum
    • Categories
    • Register
    • Login

    Change default scrollbar box padding?

    Scheduled Pinned Locked Moved Unsolved General Questions
    6 Posts 4 Posters 335 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.
    • StraticahS
      Straticah
      last edited by Straticah

      Hey there, is there a way to reduce width on the scrollbar box/container?

      The tab has some extra width to the right but it gets cropped by the scrollbar container as you can see.

      Id like a very minimalist scroll indicator - not a very big bar with lots of padding to the right and left.

      Any ideas? tweaking the values in laf did not give me any result that would get rid of the black spaces.

      //Scrollbar
      
      const SCROLLBAR_PADDING = 1;
      browserLaf.registerFunction('drawScrollbar', function(g, obj) {
      	var a = obj.handle;
      	var pa = [
      		a[0] + SCROLLBAR_PADDING + 7,
      		a[1] + SCROLLBAR_PADDING + 1,
      		a[2] - SCROLLBAR_PADDING * 13,
      		a[3] - SCROLLBAR_PADDING * 2,
      	];
      
      
      
      
      	g.setColour(0xFF0F1011);
      	g.fillRoundedRectangle(pa, 1);
      
      if (obj.over)
      {
      	g.setColour(0xFFDFE8F2);
      	g.fillRoundedRectangle(pa, 1);
      }
      
      
      
      });
      

      6e324a21-db65-4b5d-b4dc-fa89d9a4b002-image.png

      79d1b06b-c2aa-4a02-b355-adb525d17888-image.png

      building user interfaces in HISE :)
      web: www.vst-design.com

      StraticahS 1 Reply Last reply Reply Quote 0
      • StraticahS Straticah marked this topic as a question on
      • StraticahS
        Straticah @Straticah
        last edited by

        I assume this is not possible to solve the gap other than source code?
        e8a980b6-b9e0-4955-81f8-aa2bbd379fff-image.png

        building user interfaces in HISE :)
        web: www.vst-design.com

        GabG griffinboyG 2 Replies Last reply Reply Quote 0
        • GabG
          Gab @Straticah
          last edited by

          @Straticah Have you ever found a solution for that?

          1 Reply Last reply Reply Quote 0
          • griffinboyG
            griffinboy @Straticah
            last edited by griffinboy

            @Straticah

            Oh yeah so you need to also translate the shape as it moves. The scrollbar is always going to be in the same location, Laf is only a layer of paint.
            So it feels a bit weird to use when you make it look like this because it still behaves like it did before. I'd recommend getting Christoph to update it with more customisation

            HISEnbergH 1 Reply Last reply Reply Quote 0
            • HISEnbergH
              HISEnberg @griffinboy
              last edited by

              @griffinboy @Gab I think you can now use CSS styling on the preset browser. I haven't tried yet but it should allow you to do this.

              Link Preview Image
              [feature request] Preset browser search bar text in LAF

              Apologies, that is low hanging fruit and my jokes are better, but I am quite excited to explore the CSS integration into HISE

              favicon

              Forum (forum.hise.audio)

              Link Preview Image
              HISE | Docs

              favicon

              (docs.hise.dev)

              griffinboyG 1 Reply Last reply Reply Quote 2
              • griffinboyG
                griffinboy @HISEnberg
                last edited by

                @HISEnberg

                Ah, yes true I've not yet used the css but everyone is raving about it, so must be quite useful!
                I'll need to start.

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

                13

                Online

                1.7k

                Users

                11.8k

                Topics

                103.1k

                Posts