Fix Retina coordinate for stored popup menu position

This commit is contained in:
Filip Sykala 2022-02-25 11:58:15 +01:00
parent ca79932d30
commit 8022c64209
3 changed files with 15 additions and 3 deletions

View file

@ -4090,6 +4090,14 @@ bool GLCanvas3D::is_object_sinking(int object_idx) const
return false;
}
void GLCanvas3D::apply_retina_scale(Vec2d &screen_coordinate) const
{
#if ENABLE_RETINA_GL
double scale = static_cast<double>(m_retina_helper->get_scale_factor());
screen_coordinate *= scale;
#endif // ENABLE_RETINA_GL
}
bool GLCanvas3D::_is_shown_on_screen() const
{
return (m_canvas != nullptr) ? m_canvas->IsShownOnScreen() : false;