Looks like some of this positioning code is duplicated in `CodeHintList` and `ContextMenu`. Can we easily consolidate this?