How one draw the Save Preset button?
-
I found this post, doing it a way like it's part of the dialog https://forum.hise.audio/topic/11771/clicking-area-problems-with-preset-browser/7?_=1738423446986
Since there doesn't seem to have a dedicated registered function, is that the right way?
-
@ustk Check out my video about customising the preset browser, pretty sure I covered this. Another option you have is to remove the button and make an entirely custom one instead.
-
@d-healey So the solution as weird as it is, is to use the technique in the thread above.
Now I'm on the favorite icon. I can change it, but how can we scale it?
I can't seem to find a way, and this would make theColumnRowPadding
pointless if the icon isn't resizing accordingly.Also, how can we access the Main favourite button?
It doesn't seem to be part of the dialog like the other buttons... -
@ustk said in How one draw the Save Preset button?:
but how can we scale it?
I don't think you can.
@ustk said in How one draw the Save Preset button?:
Also, how can we access the Main favourite button?
It changes with the icon.
However I just noticed in my project I'm styling it in the drawDialogButton LAF with
if (obj.text == "Show Favorites")
But it could be that I added a modification in my fork to make this possible, I can't recall. -
@d-healey said in How one draw the Save Preset button?:
@ustk said in How one draw the Save Preset button?:
but how can we scale it?
I don't think you can.
That would be very inconvenient, I'll try to mod the source then...
Or perhaps just padding my SVG@ustk said in How one draw the Save Preset button?:
Also, how can we access the Main favourite button?
It changes with the icon.
Yeah I got that int my screenshot
However I just noticed in my project I'm styling it in the drawDialogButton LAF with
if (obj.text == "Show Favorites")
But it could be that I added a modification in my fork to make this possible, I can't recall.Try this, but yeah it might be a mod of your own, since I couldn't see
"Show Favorites"
inobj.text
... -
@d-healey Check out my video about…
This should be an auto-bot response here.
-
@ustk said in How one draw the Save Preset button?:
Try this, but yeah it might be a mod of your own,
Trying to find the commit where/if I added this...
-
-
@d-healey Legend!
Checking in a second…
-
@d-healey This is worth a pull request, isn't it?
-
@ustk It would probably need a preprocessor definition or perhaps a data property, otherwise all previous projects that use the preset browser will be affected.
-
@d-healey Yeah I know, shame... A better way would be to catch that
ShapeButton
like it is possible for theTextButton
but I don't how and if it is possible... -
@d-healey So it finally wasn't necessary. The colour of the fav icon is set with
itemColour
so I just had to invert the colour I was using in the property editor. This way it is possible to change the icon and the colour.In the end I find the preset browser quite tricky and unintuitive to customise, but hey, it's possible...
-
@ustk said in How one draw the Save Preset button?:
So it finally wasn't necessary.
Oh that's right, I just remembered why I needed to change it, I wanted my button to look like this: