Gui: [skip ci] replace getNormalizedPosition() with normalizePixelPos()

This commit is contained in:
wmayer
2021-11-02 19:06:12 +01:00
parent 1167babc66
commit 5bd156066e
9 changed files with 14 additions and 25 deletions

View File

@@ -1372,16 +1372,6 @@ void NavigationStyle::clearLog(void)
this->log.historysize = 0;
}
SbVec2f NavigationStyle::getNormalizedPosition(const SoEvent * const ev,
const SbViewportRegion & vpRgn) const
{
const SbVec2s size(vpRgn.getViewportSizePixels());
const SbVec2s pos(ev->getPosition());
const SbVec2f posn((float) pos[0] / (float) std::max((int)(size[0] - 1), 1),
(float) pos[1] / (float) std::max((int)(size[1] - 1), 1));
return posn;
}
void NavigationStyle::syncModifierKeys(const SoEvent * const ev)
{
// Mismatches in state of the modifier keys happens if the user