Juce_gui_stylesheet: XML file as a hot-reloadable stylesheet

Hi,

I’d like to share a GitHub repository I created that shows how to use an XML file as a hot-reloadable stylesheet for a JUCE GUI. This approach allows for fast development iterations by removing the need to recompile when tweaking UI elements variables, like colours or coordinates.

The idea was based on JUCE_LIVE_CONSTANT, allowing real-time adjustments, without needing to recompile. I’ve extended this so that an entire GUI stylesheet can be stored in an XML file, similar to how HTML and CSS works.

The repo is a simple example of how this can be used for a JUCE GUI. I’m planning to extend the repo so that it has much more features, but consider this a proof of concept. Any changes to the XML file during runtime are automatically applied to the running GUI, making iteration seamless.

It’s a small repo with minimal code, I hope it’s useful or inspiring to others facing the same problem.

Link to GitHub: GitHub - JelleBakker/juce_gui_stylesheet

I’ve also written a blog post on my website that provides an overview of JUCE GUI development, including listing some third-party extensions like HISE and JIVE. Hopefully, someone will find it interesting.

Best,

Jelle

4 Likes

Very intriguing topic, well done! I’ll put this in the queue for some lab workshops over the next week ..

Have you given any thoughts to integrating your ideas with Melatonin Inspector? Seems to me there is a low-hanging fruit there to be plucked ..

1 Like