Commit d4fb1e82 authored by Cory Quammen's avatar Cory Quammen Committed by Kitware Robot

Merge topic 'hover-points-hidpi' into release

0189588e Fix Hover {Points|Cells} tooltip on HiDPI displays
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Reviewed-by: Utkarsh Ayachit's avatarUtkarsh Ayachit <utkarsh.ayachit@kitware.com>
Merge-request: !2754
parents f5738848 0189588e
Pipeline #118391 pending with stage
......@@ -588,9 +588,14 @@ void pqRenderViewSelectionReaction::UpdateTooltip()
pipeline->GetTooltipInfo(association, tooltipPos, tooltipText))
{
QWidget* widget = this->View->widget();
// Take DPI scaling into account for the transformation
qreal dpr = widget->devicePixelRatioF();
// Convert renderer based position to a global position
QPoint pos =
widget->mapToGlobal(QPoint(tooltipPos[0], widget->size().height() - tooltipPos[1]));
QPoint pos = widget->mapToGlobal(
QPoint(tooltipPos[0] / dpr, widget->size().height() - (tooltipPos[1] / dpr)));
QToolTip::showText(pos, tooltipText.c_str());
}
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment