Commit 70795c19 authored by Teemu Patana's avatar Teemu Patana Committed by Harald Sitter
Browse files

Fix tooltip positioning in RadialMap

The tooltip position was incorrect when shown on the edge of second screen.

BUG: 417162
parent 90f3afb3
......@@ -164,10 +164,10 @@ void RadialMap::Widget::mouseMoveEvent(QMouseEvent *e)
// Same content as before
if (m_focus == oldFocus) {
if (tooltipRect.right() > screenRect.right()) {
tooltipPosition.setX(screenRect.width() - m_tooltip.width());
tooltipPosition.setX(screenRect.x() + screenRect.width() - m_tooltip.width());
}
if (tooltipRect.bottom() > screenRect.bottom()) {
tooltipPosition.setY(screenRect.height() - m_tooltip.height());
tooltipPosition.setY(screenRect.y() + screenRect.height() - m_tooltip.height());
}
m_tooltip.move(tooltipPosition);
return;
......@@ -239,10 +239,10 @@ void RadialMap::Widget::mouseMoveEvent(QMouseEvent *e)
// Make sure we're visible on screen
tooltipRect.setSize(QSize(tooltipWidth, tooltipHeight));
if (tooltipRect.right() > screenRect.right()) {
tooltipPosition.setX(screenRect.width() - m_tooltip.width());
tooltipPosition.setX(screenRect.x() + screenRect.width() - m_tooltip.width());
}
if (tooltipRect.bottom() > screenRect.bottom()) {
tooltipPosition.setY(screenRect.height() - m_tooltip.height());
tooltipPosition.setY(screenRect.y() + screenRect.height() - m_tooltip.height());
}
m_tooltip.move(tooltipPosition);
......
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