Mercurial > hg > svgui
diff view/Pane.cpp @ 1402:b0eeec95ab5b
Handle integer pixel scaling as well
author | Chris Cannam |
---|---|
date | Thu, 15 Nov 2018 14:18:26 +0000 |
parents | 28075cc658c9 |
children | a33d38247631 |
line wrap: on
line diff
--- a/view/Pane.cpp Thu Nov 15 14:04:32 2018 +0000 +++ b/view/Pane.cpp Thu Nov 15 14:18:26 2018 +0000 @@ -1173,7 +1173,7 @@ if (!m_manager) return Selection(); - sv_frame_t testFrame = getFrameForX(x - scaleSize(5)); + sv_frame_t testFrame = getFrameForX(x - scalePixelSize(5)); if (testFrame < 0) { testFrame = getFrameForX(x); if (testFrame < 0) return Selection(); @@ -1185,14 +1185,14 @@ int lx = getXForFrame(selection.getStartFrame()); int rx = getXForFrame(selection.getEndFrame()); - int fuzz = scaleSize(2); + int fuzz = scalePixelSize(2); if (x < lx - fuzz || x > rx + fuzz) return Selection(); int width = rx - lx; - fuzz = scaleSize(3); + fuzz = scalePixelSize(3); if (width < 12) fuzz = width / 4; - if (fuzz < scaleSize(1)) { - fuzz = scaleSize(1); + if (fuzz < scalePixelSize(1)) { + fuzz = scalePixelSize(1); } if (x < lx + fuzz) closeToLeftEdge = true;