mirror of https://github.com/stella-emu/stella.git
PopupWidget is now correctly positioned in hidpi mode.
This commit is contained in:
parent
e7759048ca
commit
ef93ecfbd6
|
@ -122,8 +122,9 @@ void PopUpWidget::handleMouseDown(int x, int y, MouseButton b, int clickCount)
|
||||||
const Common::Rect& image = instance().frameBuffer().imageRect();
|
const Common::Rect& image = instance().frameBuffer().imageRect();
|
||||||
const Common::Rect& srect = dialog().surface().dstRect();
|
const Common::Rect& srect = dialog().surface().dstRect();
|
||||||
uInt32 tx = srect.x(), ty = srect.y();
|
uInt32 tx = srect.x(), ty = srect.y();
|
||||||
tx += getAbsX() + _labelWidth - image.x();
|
uInt32 scale = instance().frameBuffer().hidpiScaleFactor();
|
||||||
ty += getAbsY() + getHeight() - image.y();
|
tx += scale * (getAbsX() + _labelWidth) - image.x();
|
||||||
|
ty += scale * (getAbsY() + getHeight()) - image.y();
|
||||||
myMenu->show(tx, ty, myMenu->getSelected());
|
myMenu->show(tx, ty, myMenu->getSelected());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue