PresetBrowser LAF Scrollbar
-
@Straticah You don't need it. There is a whole laf function -
drawPresetBrowserSearchBar
This is what mine looks like:
-
@d-healey ah need to check on that. good job, looks very clean :)
-
@d-healey got it to work :)
why does this colour on "favorite_on" cant be applied here? Is it because it is using an id and is different to the obj functions?
// Search and Fav Icons browserLaf.registerFunction("createPresetBrowserIcons", function(id) { if (id == "favorite_on") { return ICON_NO_4_path; g.setColour(0xFF2EFFE9); } if (id == "favorite_off") return ICON_NO_4_path; if (id == "searchIcon") return ICON_NO_6_path; });
-
@Straticah said in PresetBrowser LAF Scrollbar:
@d-healey got it to work :)
why does this colour on "favorite_on" cant be applied here? Is it because it is using an id and is different to the obj functions?
// Search and Fav Icons browserLaf.registerFunction("createPresetBrowserIcons", function(id) { if (id == "favorite_on") { return ICON_NO_4_path; g.setColour(0xFF2EFFE9); } if (id == "favorite_off") return ICON_NO_4_path; if (id == "searchIcon") return ICON_NO_6_path; });
you appear to be setting the colour AFTER you have returned from the function - so it never happens...try it the other way round...
g.setColour(0xFF2EFFE9); return ICON_NO_4_path;
You will need to specifically reset the colour back to the way you want it in the other if statements...
-
@Straticah said in PresetBrowser LAF Scrollbar:
why does this colour on "favorite_on" cant be applied here? Is it because it is using an id and is different to the obj functions?
As you can see, other LAF functions have
g
andobj
arguments, so we can useobj...
andg...
functions with them.But that
createPresetBrowserIcons
LAF uses only icon id's that meansg
andobj
arguments won't work with it. Only icon id's to draw the paths. -
@orange ah thy, that is what i thought. At what place can i change the colour independent from item colour. Or is there no possible way to colour on and off differently? :)
-
@Straticah I don't think you can change the colour of the fav icon through LAF, all you can do is set the icon. The colour property is taken from the floating tile colours.
-
@Straticah You can change the color of the Favorite icon from the
itemColour
of the Preset Browser Floating Tile -
@d-healey @orange ah i see, thats what i did so far, this would mean i will use a different icon for on and off state. I liked the idea of having dark icons that change to gradient ones on selection. But maybe the feature comes in a future update :)
getting close to my initial figma document tho thanks to you guys help
-
@Straticah looks great, well done