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 <>
Reviewed-by: Utkarsh Ayachit's avatarUtkarsh Ayachit <>
Merge-request: !2754
parents f5738848 0189588e
Pipeline #118391 canceled with stage
...@@ -588,9 +588,14 @@ void pqRenderViewSelectionReaction::UpdateTooltip() ...@@ -588,9 +588,14 @@ void pqRenderViewSelectionReaction::UpdateTooltip()
pipeline->GetTooltipInfo(association, tooltipPos, tooltipText)) pipeline->GetTooltipInfo(association, tooltipPos, tooltipText))
{ {
QWidget* widget = this->View->widget(); 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 // Convert renderer based position to a global position
QPoint pos = QPoint pos = widget->mapToGlobal(
widget->mapToGlobal(QPoint(tooltipPos[0], widget->size().height() - tooltipPos[1])); QPoint(tooltipPos[0] / dpr, widget->size().height() - (tooltipPos[1] / dpr)));
QToolTip::showText(pos, tooltipText.c_str()); QToolTip::showText(pos, tooltipText.c_str());
} }
else 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