I'm noticing that present()'ing a view with style = 'popover' doesn't seem to take the window title bar into account when popover_location is specified.
I could be getting this wrong, but I'm trying to show the popover with its little arrow pointing at the icon-only button from which it is spawned. The view that button is in is a ui.View presented with style="sheet" on top of the main ui.View of my app. I don't add the popover view as a subview of anything, and even if I do add it as a subview of the sheet, it still shows up in the "wrong" place.
First, I tested where popover_location = (0,0) placed the arrow, and that appears to be the top-left of the sheet view. Not the upper-left of the screen. So I figured the coordinates were in the space of the current key window, which in this case is the sheet view. So I tried to get the position of the icon button in coordinates which would be correct for the sheet by doing:
pos = iconButton.center
pos = ui.convert_point(pos, parentView, None)
pos = ui.convert_point(pos, None, sheetView)
the idea there was to take the center of the button, which is in parent coordinates, and convert it to screen coordinates, then convert from screen coordinates to coordinates in the sheetView coordinates, but that places it too high, I have to add a value which accounts for the sheetView title bar height for when it's displayed as a sheet in order to get the right placement. So that leaves me with 2 questions:
- Is there a way to get the title bar height programmatically? Right now I'm just hardcoding a number.
- Is there a correct way to get the popover_location value which will properly take into account the title bar? The sheetView has no superview() when presented, so I have no way of directly converting the center of the iconButton to a position in the presented sheet window...but perhaps there is a way I'm unaware of.

