Added ShowFolderRows option to Preset Browser
-
I'm using a single-column preset browser in my plugin, but wanted a way to show folder breaks in the list. The interim was to write tiny folder name text at the top of the preset row that changes folder, but it's a hack and looks terrible anyway.
So I had Claude add a
ShowFolderRowsJSON param to the native preset browser:# How to use it const var data = { "Type": "PresetBrowser", "NumColumns": 1, "ShowFolderRows": true, ... }; # And optionally in your LAF script: laf.registerFunction("drawPresetBrowserFolderRow", function(g, obj) { g.setColour(Colours.withAlpha(obj.textColour, 0.5)); g.setFont(obj.font, obj.fontSize - 2); g.drawAlignedText(obj.text, obj.area, "left"); });So now I have nice folder breaks in my single column preset list:

I know the general consensus is "if you don't like the native preset browser, build your own". But I didn't want to script my own preset browser just for this one extra feature, because the native preset browser is battle-tested and has really nice mechanics for free.
I also know this is highly unlikely to get accepted upstream but I made a PR that might help someone else who is looking for the same feature in the future:
-
@dannytaurus said in Added ShowFolderRows option to Preset Browser:
I also know this is highly unlikely to get accepted upstream
I've made a lot of PRs related to the preset browser over the years, most of which (possibly all) have been merged. This seems like a good candidate.
-
@David-Healey Yours always seems to be more generally useful than mine though

This one is pretty niche but I'll likely be using single column preset browsers in most of my plugins, so it's really useful for me.