Css classes in regular look and feel?
-
I think it would be useful to have css classes in the
objin regular look and feel functions, it would also be good to have agetStyleSheetClassscript function.Even though I'm not using css I think being able to tag components with classes like this would help me make my look and feel scripting more generic.
-
@David-Healey yes why not - the classes are stored in the juce::Component::properties object for each UI element so we can simply query it (just like we do with the
idproperty) - however it will show custom class selectors as well as the ones that HISE automatically attaches to components - there is no way of distinguishing those at that point. This would make this field (and the method) a bit more noisy than you would expect. -
@Christoph-Hart I don't think that's a problem, it might even be beneficial. I notice that some of the preset browser laf functions already include the classes in the obj.
-
I had Claude give it a go. I also noticed that the linear-slider class is added to knobs, even though they're not linear.
Also made it available in laf and added
getStyleSheetPropertytoo