preset browser scroll bar
-
Hello, how can I reduce the display size of this? Can someone help me?
-
@xsaad You need
laf.registerFunction("drawScrollbar", function(g, obj) { // Your code });
-
@DabDab Thanks my friend. Do you have any example that can help me understand how to reduce its width?
-
@xsaad said in preset browser scroll bar:
@DabDab Thanks my friend. Do you have any example that can help me understand how to reduce its width?
const var laf = Engine.createGlobalScriptLookAndFeel(); const var ScrollBar = [ 110,109,51,51,85,66,0,0,160,66,108,205,204,66,66,0,0,160,66,98,0,0,52,66,0,0,160,66,0,0,40,66,0,0,154,66,0,0,40,66,154,153,146,66,108,0,0,40,66,154,153,229,65,98,0,0,40,66,0,0,200,65,0,0,52,66,0,0,176,65,205,204,66,66,0,0,176,65,108,51,51,85,66,0,0,176, 65,98,0,0,100,66,0,0,176,65,0,0,112,66,0,0,200,65,0,0,112,66,154,153,229,65,108,0,0,112,66,154,153,146,66,98,0,0,112,66,0,0,154,66,0,0,100,66,0,0,160,66,51,51,85,66,0,0,160,66,99,109,0,0,88,66,0,0,58,66,109,0,0,64,66,0,0,58,66,109,0,0,88,66,0,0,74,66, 109,0,0,64,66,0,0,74,66,109,0,0,88,66,0,0,90,66,109,0,0,64,66,0,0,90,66,109,0,0,88,66,0,0,102,66,109,0,0,64,66,0,0,106,66,109,0,0,76,66,0,0,220,65,98,102,102,70,66,0,0,220,65,0,0,66,66,205,204,228,65,0,0,66,66,0,0,240,65,98,0,0,66,66,51,51,251,65,102, 102,70,66,0,0,2,66,0,0,76,66,0,0,2,66,98,154,153,81,66,0,0,2,66,0,0,86,66,51,51,251,65,0,0,86,66,0,0,240,65,98,0,0,86,66,205,204,228,65,154,153,81,66,0,0,220,65,0,0,76,66,0,0,220,65,99,109,0,0,76,66,0,0,137,66,98,102,102,70,66,0,0,137,66,0,0,66,66,51, 51,139,66,0,0,66,66,0,0,142,66,98,0,0,66,66,205,204,144,66,102,102,70,66,0,0,147,66,0,0,76,66,0,0,147,66,98,154,153,81,66,0,0,147,66,0,0,86,66,205,204,144,66,0,0,86,66,0,0,142,66,98,0,0,86,66,51,51,139,66,154,153,81,66,0,0,137,66,0,0,76,66,0,0,137,66, 99,109,0,0,98,66,0,0,62,66,108,0,0,98,66,0,0,58,66,108,0,0,58,66,0,0,58,66,108,0,0,58,66,0,0,62,66,109,0,0,98,66,0,0,70,66,108,0,0,98,66,0,0,58,66,108,0,0,58,66,0,0,58,66,108,0,0,58,66,0,0,70,66,109,0,0,98,66,0,0,78,66,108,0,0,98,66,0,0,66,66,108,0,0, 58,66,0,0,66,66,108,0,0,58,66,0,0,78,66,109,0,0,98,66,0,0,86,66,108,0,0,98,66,0,0,74,66,108,0,0,58,66,0,0,74,66,108,0,0,58,66,0,0,86,66,109,0,0,98,66,0,0,90,66,108,0,0,98,66,0,0,82,66,108,0,0,58,66,0,0,82,66,108,0,0,58,66,0,0,90,66,108,0,0,98,66,0,0, 90,66,99,101,0,0 ]; const var pathScroll = Content.createPath(); pathScroll.loadFromData(ScrollBar); const SCROLLBAR_PADDING = 5; laf.registerFunction('drawScrollbar', function(g, obj) { var a = obj.handle; var pa = [ a[0] + SCROLLBAR_PADDING, /// Adjust x pos a[1] + SCROLLBAR_PADDING, /// Adjust y pos a[2] - SCROLLBAR_PADDING+5, /// Adjust width a[3] - SCROLLBAR_PADDING, // /// Adjust height ]; g.setColour(Colours.darkgrey); g.fillRoundedRectangle(pa,3.0); });
-
@DabDab Thanks bro, I appreciate your help:folded_hands: