Get Info panel position

Hi! I’m trying to add some info to go next to tab’s info view; can I ask what’s the best way to do that, how to get its position on the screen?

I use tab.viewPort.origin to calculate the position, but it seems like a long way around and the text is jumpy because of the rounding.

tab.graphicView().infoView().bounds.origin is always (0, 0), so that’s doesn’t help either. Am I overlooking something obvious?

What do you try to put there?


should work.

Or use the insectorView API to add your own info box.

1 Like

Thank you, that’s much better!
Almost there, just showing the angle:

However, in Glyphs 2 one can add a GSInspectorView to the panel with view method, but it doesn’t work in Glyphs 3. Is it different now?

def view(self):

Also, is there a way to change its position relative to the main panel? I’d put it above the width/height rather than on the right.

FYI that should be Font.currentTab.infoView().frame() (or with your tab variable tab.infoView().frame())

you need to return an NSViewController.

What class and superclass is self?