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

Cheat in the inspector bounding box when whole plugin editor is selected #61

Open sudara opened 1 year ago

sudara commented 1 year ago

Right now

AudioPluginHost - 2023-08-22 51@2x

sudara commented 7 months ago

@dikadk This one drives me crazy and might be easy for you since I think you last touched most of the selection logic.

Basically, we need to display the full corners + hover/selection line when they butt up against the overlay's edges.

So if there's a line at 0,0 to 500,0 we actually need to "cheat" the selection bounds and put them inside the boundary (enough that the full corners are visible, so maybe the line would have a y position of 3. And that goes for every edge separately...

just not sure if we use the drawing bounds for calculations, like to show width/height and stuff, we want that stuff to stay exact, i guess.