sudara / melatonin_inspector

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

Improved reliability of clicking on disclosure triangle #51

Closed FigBug closed 1 year ago

FigBug commented 1 year ago

I was still having issues clicking the triangle to open / close items. Now the hit target is the exact location of where the triangle is drawn.

sudara commented 1 year ago

hmm what OS have you been using? Wondering if it was a mac/win issue.

FigBug commented 1 year ago

I'm on macOS

sudara commented 1 year ago

macOS here too. Strange, I still wonder what the specific issue was, it was very solid for me.

Good call on having a disclosureRect and deriving bounds via event translation. Much better than the recursive parent stuff I stole from TreeViewItem.

This implementation has a couple glitches for me:

  1. The item is suddenly selectable in a sliver to the left of the icon.

AudioPluginHost - 2023-08-16 24

  1. The right side of the icon behaves as selection vs. disclosure toggle. It should be a toggle right up to the first pixel of text.

AudioPluginHost - 2023-08-16 51

Also, this is unrelated to your changes, but there seems to be a debounce glitch when toggling disclosure on non-selected item.

AudioPluginHost - 2023-08-16 57

FigBug commented 1 year ago

Ok, I tweaked the hit test area

sudara commented 1 year ago

Pixel perfect! Thanks Roland!!