sudara / melatonin_inspector

A JUCE module that gives you the ability to inspect and visually edit (non-destructively) components in your UI.
MIT License
145 stars 17 forks source link

Release v1.3: Color, Properties and Component Timings #48

Closed sudara closed 1 year ago

sudara commented 1 year ago

This builds upon @FigBug's property and color work in #46 and:

TODO:

FOLLOWUPS:

AudioPluginHost - 2023-08-14 38

AudioPluginHost - 2023-08-14 25

AudioPluginHost - 2023-08-14 01

AudioPluginHost - 2023-08-16 57

sudara commented 1 year ago

@dikadk This is just about ready to go, you could include melatonin_inspector/melatonin/helpers/timing.h stick melatonin::ComponentTimer timer { this }; at the top of a paint method to try it out.

Still a few bugs to knock out, then I'll update README and announce the features on the forum.

sudara commented 1 year ago

Ok, I fixed all the bugs I kept running into. If anyone wants to test before release, I'd be happy for any feedback!

FigBug commented 1 year ago

Here is a patch that cleans up some warnings. Also, when disabling the colour picker, I think the zoomed in image should go back to the zoomed out version.

warnings.patch

sudara commented 1 year ago

Thanks!

when disabling the colour picker, I think the zoomed in image should go back to the zoomed out version.

Ah yeah, I feel like i fixed this 5 times, I'll do another round, thx!

FigBug commented 1 year ago

Another issue I'm seeing is clicking on an item in the tree either expands it or collapses it, but does not always select it. Seems like you can only reliably select items without children.

sudara commented 1 year ago

does not always select it.

@FigBug Is this only in the case of clicking on the disclosure triangle (or to the left of it)? If so that was intentional, to allow open/closing without changing selection. But if you think it makes most sense to always select on open, I can add that behavior back. Also let me know if you are seeing it be glitchy, as I spent (too much time) trying to sort that, it's possible there's still some edge cases.

It looks like on deselect the preview needs to be cleared too. I'll take a look tomorrow.

sudara commented 1 year ago

Ahh, found the issue. It was really next to impossible to skin the TreeViewItem as we had it designed (full width background selection), as the the widget's styling/position is coupled with behavior (as often the case with JUCE widgets). The issue here was twofold, toggling disclosure was forcing selection and I accidentally left in some additional mouse listening.

I double checked the existing behavior on main:

AudioPluginHost - 2023-08-16 38

Behavior should now be same as on main.

However, there are a few minor additional changes:

sudara commented 1 year ago

Releasing for now, we can followup with any minor changes.

sudara commented 1 year ago

FYI also working on the bug with the color picker and "even number of zoomed in pixels" in case anyone runs into that.