Scripted dynamic buttons: icon sizes?

I wanted to replace a dynamic button on my vertical toolbar that shows all the folders of the current directory I’m in. The following button command

Go CURRENT FOLDERCONTENT="showempty,noparselinks,norecurse,nofiles,maxdirs=100,maxwidth=25"

does not offer the full range of possibilities of scripting. With a scripted dynamic button - this relatively new feature introduced some half year ago or so - a lot more is possible. For instance I can show ‘pinned’ folders (folders having an Opus ‘pinned’ label) on top of the rest of the folders.

But I encountered a problem. If I don’t use icons, the entries cannot be properly aligned so it seems. Below are both solutions active on my vertical toolbar - the FIRST one is the new, scripted solution (with 3 pinned folders on top), the second one is the old solution:

Problem is that the folder names are not aligned properly. Unfortunately, in Opus this can only be done by activating an icon. But doing so creates a different problem:

This is the result of adding the following properties to the button objects for each subfolder:

button.showlabel = 'left'; 
button.image="#folder";
button.showimage=true; //true or false, "dual", "large", or "largedual".

Setting showimage to ‘true’ created a smaller image than using the value “dual” or anything else (which make the icon size only higher), but even the smalles one causes a lot of space being wasted if you compare it to the old solution (the second part) in the toolbar).

Is there a solution or workaround for this? Is it a bug?

You're using the internal icon set, which is 20x20 vs shell icons which are 16x16.

If you want a smaller folder icon you can use the default Windows one with %SystemRoot%\System32\shell32.dll,3 or just pass the full path of the folder itself to get the shell icon for each individual folder.

Passing the path works indeed and solves the space issue. Showimage must still be set to true, not to ‘dual’ or anything else (which still shows a big icon).

button.showlabel = 'left';
button.image=path;
button.showimage=true; //true or false, "dual", "large", or "largedual".

Still, I wonder why this is so incongruous compared to straightforward buttons or even “Go FOLDERCONtENT”, where no such trouble exists. The latter even automatically picks up the alternative icon I define for a folder:

buttons1

This is not the case with the above solution for programmed dynamic buttons:

buttons2

Maybe there’s an additional parameter to add to the path, @Jon ? Clearly there’s something with this programmed buttons implementation which is out of order.

I’m not letting my sleep over this - your solution solved the loss of space, that’s what mattered the most. Thanks a lot - solution accepted.

Thanks